# example

1. <?php
3. /**
4. * Insert a pie chart into a Word document.
5. *
6. * @category Phpdocx
7. * @package examples
8. * @subpackage easy
9. * @copyright Copyright (c) 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 3.0
13. * @link http://www.phpdocx.com
14. * @since File available since Release 3.0
15. */
16. require_once '../../classes/CreateDocx.inc';
18. $docx = new CreateDocx();
20. $legends = array(
21. 'legend1' => array(10),
22. 'legend2' => array(20),
23. 'legend3' => array(40)
24. );
26. $paramsChart = array(
27. 'data' => $legends,
28. 'type' => 'pie3DChart',
29. 'title' => 'Title',
30. 'rotX' => 20,
31. 'rotY' => 20,
32. 'perspective' => 30,
33. 'color' => 2,
34. 'textWrap' => 0,
35. 'sizeX' => 10,
36. 'sizeY' => 10,
37. 'jc' => 'right',
38. 'showPercent' => 1,
39. 'font' => 'Times New Roman'
40. );
41. $docx->addChart($paramsChart);
44. $docx->createDocx('../docx/example_chart');

Documentation generated on Tue, 21 May 2013 17:19:47 +0200 by phpDocumentor 1.4.4