create
[ class tree: create ] [ index: create ] [ all elements ]

example

  1. <?php
  2.  
  3. /**
  4.  * Insert a col chart into a Word document.
  5.  *
  6.  * @category   Phpdocx
  7.  * @package    examples
  8.  * @subpackage easy
  9.  * @copyright  Copyright (c) 2009-2013 Narcea Producciones Multimedia S.L.
  10.  *              (http://www.2mdc.com)
  11.  * @license    http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
  12.  * @version    2012.12.26
  13.  * @link       http://www.phpdocx.com
  14.  * @since      File available since Release 2.2
  15.  */
  16. require_once '../../classes/CreateDocx.inc';
  17.  
  18. $docx new CreateDocx();
  19.  
  20. $colChartValues array(
  21.     'legend' => array('Internet Explorer''Firefox''Chrome''Safari''Opera'),
  22.     'November 2010' => array('28.6''44.0''20.5''4.0''2.3'),
  23.     'December 2010' => array('27.5''43.5''22.4''3.8''2.2'),
  24.     'January 2011' => array('26.6''42.8''23.8''4.0''2.5')
  25. );
  26.  
  27. $paramsChart array(
  28.     'data' => $colChartValues,
  29.     'type' => 'colChart',
  30.     'title' => 'W3C Browser Statistics',
  31.     'color' => 2,
  32.     'sizeX' => 15,
  33.     'sizeY' => 15,
  34.     'jc' => 'center',
  35.     'groupBar' => 'clustered',
  36.     'font' => 'Lucida Console'
  37. );
  38. $docx->addChart($paramsChart);
  39.  
  40. $docx->createDocx('../docx/example_chart_col');

Documentation generated on Mon, 13 Jan 2014 13:44:05 +0100 by phpDocumentor 1.4.4