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

example

  1. <?php
  2.  
  3. /**
  4.  * Inserts a 3D area chart with a table embedded in a list 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.  
  20.  
  21. $completedData array(
  22.     'legend' => array('data 1''data 2''data 3'),
  23.     'data 1' => array('10'05),
  24.     'data 2' => array('20'603),
  25.     'data 3' => array('50'337),
  26.     'data 4' => array('25'00)
  27. );
  28.  
  29. $paramsChart array(
  30.     'data' => $completedData,
  31.     'type' => 'area3DChart',
  32.     'title' => 'Area 3D Chart with simple data and legends',
  33.     'color' => '5',
  34.     'perspective' => '30',
  35.     'rotX' => '30',
  36.     'rotY' => '30',
  37.     'font' => 'Arial',
  38.     'jc' => 'right',
  39.     'showtable' => 0,
  40.     'textWrap' => '4',
  41.     'sizeX' => '10',
  42.     'sizeY' => '20',
  43.     'legendPos' => 't',
  44.     'legendOverlay' => '0',
  45.     'border' => '1',
  46.     'haxLabelDisplay' => 'horizontal',
  47.     'vaxLabelDisplay' => 'horizontal',
  48.     'hgrid' => '1',
  49.     'vgrid' => '3',
  50. );
  51.  
  52. $paramsChart['title'='Area 3D Chart embedded in a list';
  53. $chart $docx->addElement('addGraphic'$paramsChart);
  54. $valuesList array(
  55.     'area 1',
  56.     $chart,
  57.     'area 2',
  58.     'area 3',
  59. );
  60. $paramsList array('val' => 1);
  61. $docx->addList($valuesList$paramsList);
  62.  
  63. $docx->createDocx('../docx/example_chart_area3d_list');

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