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

example

  1. <?php
  2.  
  3. /**
  4.  * Inserts a percent stacked 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.7
  15.  */
  16. require_once '../../classes/CreateDocx.inc';
  17.  
  18. $docx new CreateDocx();
  19. $completedData array(
  20.     'legend' => array('Data 1''Data 2''Data 3'),
  21.     'data 1' => array('10'05),
  22.     'data 2' => array('20'603),
  23.     'data 3' => array('50'337),
  24.     'data 4' => array('25'00)
  25. );
  26. $paramsChart array(
  27.     'data' => $completedData,
  28.     'type' => 'col3DChart',
  29.     'groupBar' => 'percentStacked',
  30.     'title' => 'Completed bar 3D Chart',
  31.     'color' => '5',
  32.     'perspective' => '30',
  33.     'rotX' => '30',
  34.     'rotY' => '30',
  35.     'font' => 'Arial',
  36.     'jc' => 'right',
  37.     'showtable' => 1,
  38.     'textWrap' => '4',
  39.     'sizeX' => '10',
  40.     'sizeY' => '10',
  41.     'legendPos' => 't',
  42.     'legendOverlay' => '0',
  43.     'border' => '1',
  44.     'haxLabel' => 'label horizontal',
  45.     'vaxLabel' => 'label vertical',
  46.     'haxLabelDisplay' => 'horizontal',
  47.     'vaxLabelDisplay' => 'horizontal',
  48.     'hgrid' => '3',
  49.     'vgrid' => '2',
  50. );
  51. $docx->addChart($paramsChart);
  52.  
  53. $docx->createDocx('../docx/example_chart_percentStacked');

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