Forum


Replies: 4   Views: 3580
Addtemplatechart params not working
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by liam.whan  · 22-11-2012 - 10:27

Hi There,

I am experiencing some difficulty with the params for addTemplateChart my code is:
'
[code]$legends = array(
'Confident' => array(10),
'Needs Some Development' => array(30),
'Needs Significant Development' => array(40)
);

$paramsChart =
array(
'data' => $legends,
'type' => 'pie3DChart',
'title' => 'Capability Areas',
'legendpos' => 'b',
'legendoverlay' => 0,
'border' => 1,
'cornerX' => 20,
'cornerY' => 20,
'cornerP' => 30,
'color' => 2,
'textWrap' => 0,
'sizeX' => 15,
'sizeY' => 15,
'jc' => 'center',
'showPercent' => 0,
'font' => 'Verdana'
);

$docx->addTemplateChart('CHART', $paramsChart);[/code]

and the output I get in Word is:
[img]https://myadhclearningplan.com.au/Capture.PNG[/img]

my questions are:
1. Why is the Title appearing in the legend overlay,
2. Why is the legend overlay appearing at all 'legendoverlay' is set to 0
3. Why are the percentages showing 'showPercent' is set to 0
4. How do I get the legend to show just the Legend name and the Percent (i.e. 'Confident 50%')


an example of what I am trying to achieve ( and the Word 2010 settings required) is below:
[img]https://myadhclearningplan.com.au/Capture2.PNG[/img]

Liam.