Forum


Replies: 1   Views: 2545
Xlsx data chart
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 Red Nacional de Refugios  · 21-11-2017 - 01:28

i am using  xslx to generate a chart but the data doesn`t change,  only the size  how  can i to change the data.

the example don`t use data property 

 

require_once 'classes/CreateDocx.inc';

$docx = new CreateDocx();

$paramsChart = array(
    'externalXLSX' => array(
        'src' => 'Book.xlsx',
    ),
    'sizeX' => 10,
    'sizeY' => 5,
);
$docx->addChart($paramsChart);

$docx->createDocx('output');

thank you 

Posted by admin  · 21-11-2017 - 07:18

Hello,

When you add a chart using the externalXLSX option, all properties are ignored but sizeX and sizeY values.

If you want to replace the data of a existing chart, you need to use the replaceChartData method.

Regards.