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

example

  1. <?php
  2.  
  3. /**
  4.  * Stacked horizontal cylinder chart in 3D with text and title.
  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      2012.12.26
  15.  */
  16. require_once '../../classes/CreateDocx.inc';
  17.  
  18. $docx new CreateDocx();
  19.  
  20. $docx->addBreak();
  21.  
  22. $text 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
  23.     'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' .
  24.     'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' .
  25.     'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' .
  26.     'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' .
  27.     'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' .
  28.     'officia deserunt mollit anim id est laborum.';
  29.  
  30. $paramsText array(
  31.     'font' => 'Arial',
  32.     'sz' => 12
  33. );
  34.  
  35. $docx->addText($text$paramsText);
  36.  
  37. $docx->addBreak();
  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.  
  47. $args array(
  48.     'data' => $legends,
  49.     'type' => 'bar3DChartCylinder',
  50.     'title' => 'Cylinder chart',
  51.     'color' => 2,
  52.     'textWrap' => 0,
  53.     'sizeX' => 15'sizeY' => 15,
  54.     'showPercent' => 1,
  55.     'font' => 'Arial',
  56.     'groupBar' => 'stacked',
  57.     'legendPos' => 'none',
  58.       'border' => 1,
  59.     'showtable' => 1,
  60.       'hgrid' => 3,
  61.       'vgrid' => 3
  62. );
  63. $docx->addChart($args);
  64.  
  65. $docx->createDocx('../docx/example_chart_cylinder');

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