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

example

  1. <?php
  2.  
  3. /**
  4.  * Inserts a pie chart with a secondary bar 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. $simpleData array(
  20.     'data 1' => array('10'),
  21.     'data 2' => array('20'),
  22.     'data 3' => array('50'),
  23.     'data 4' => array('25'),
  24.     'data 5' => array('5'),
  25.     'data 6' => array('15'),
  26.     'data 7' => array('55'),
  27.     'data 8' => array('75'),
  28.     'data 9' => array('60'),
  29.     'data 10' => array('25'),
  30. );
  31.  
  32. $paramsChart array(
  33.     'data' => $simpleData,
  34.     'type' => 'ofPieChart',
  35.     'subtype' => 'bar',
  36.     'title' => 'Secondary bar chart',
  37.     'color' => '2',
  38.     'sizeX' => 15,
  39.     'sizeY' => 15,
  40.     'jc' => 'right',
  41.     'font' => 'Times New Roman',
  42.     'gapWidth' => 150,
  43.     'secondPieSize' => 75,
  44.     'splitType' => 'percent'
  45.     'splitPos' => 20
  46.  
  47. );
  48. $docx->addChart($paramsChart);
  49.  
  50. $docx->createDocx('../docx/example_chart_ofpie_chart_bar');

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