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

example

  1. <?php
  2.  
  3. /**
  4.  * Inserts a col and a 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.2
  15.  */
  16. require_once '../../classes/CreateDocx.inc';
  17.  
  18. $docx new CreateDocx();
  19.  
  20. $colChartValues array(
  21.     'legend' => array('Internet Explorer'),
  22.     'January 2011' => array('26.6'),
  23.     'February 2011' => array('26.5'),
  24.     'March 2011' => array('25.8'),
  25.     'April 2011' => array('24.3'),
  26.     'May 2011' => array('24.9'),
  27.     'June 2011' => array('23.2')
  28. );
  29.  
  30. $paramsChart array(
  31.     'data' => $colChartValues,
  32.     'type' => 'barChart',
  33.     'title' => 'W3C Browser Statistics',
  34.     'color' => 2,
  35.     'sizeX' => 15,
  36.     'sizeY' => 15,
  37.     'jc' => 'center',
  38.  
  39. );
  40.  
  41. $docx->addChart($paramsChart);
  42.  
  43. $paramsChart array(
  44.     'data' => $colChartValues,
  45.     'type' => 'colChart',
  46.     'title' => 'W3C Browser Statistics',
  47.     'color' => 2,
  48.     'sizeX' => 15,
  49.     'sizeY' => 15,
  50.     'jc' => 'center',
  51.  
  52. );
  53.  
  54. $docx->addChart($paramsChart);
  55.  
  56. $docx->createDocx('../docx/example_chart_bar');

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