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

example

  1. <?php
  2.  
  3. /**
  4.  * Two charts in the same Word document.
  5.  *
  6.  * @category   Phpdocx
  7.  * @package    examples
  8.  * @subpackage intermediate
  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 1.8
  15.  */
  16. require_once '../../classes/CreateDocx.inc';
  17.  
  18. $docx new CreateDocx();
  19.  
  20. $legends array(
  21.     'legend1' => array(10),
  22.     'legend2' => array(0),
  23.     'legend3' => array(40)
  24. );
  25. $args array(
  26.     'data' => $legends,
  27.     'type' => 'pie3DChart',
  28.     'title' => 'Title first chart',
  29.     'rotX' => 20'rotY' => 20'perspective' => 30,
  30.     'color' => 2,
  31.     'textWrap' => 0,
  32.     'sizeX' => 10'sizeY' => 10,
  33.     'jc' => 'left',
  34.     'showPercent' => 1,
  35.     'font' => 'Times New Roman'
  36. );
  37. $docx->addChart($args);
  38.  
  39. $legends array(
  40.     'legend' => array('sequence 1''sequence 2''sequence 3'),
  41.     'Category 1' => array(9.32.42),
  42.     'Category 2' => array(2.54.41),
  43.     'Category 3' => array(3.51.80.5),
  44.     'Category 4' => array(1.581)
  45. );
  46. $args array(
  47.     'data' => $legends,
  48.     'type' => 'colChart',
  49.     'title' => 'Title second chart',
  50.     'color' => 2,
  51.     'textWrap' => 0,
  52.     'sizeX' => 17'sizeY' => 7,
  53.     'jc' => 'center',
  54.     'font' => 'Arial'
  55. );
  56. $docx->addChart($args);
  57.  
  58. $docx->createDocx('../docx/example_chart');

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