Forum


Replies: 3   Views: 2514
Repeat x axis name in colchart
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 Samuel  · 17-02-2017 - 14:12

Hi,

I have a problem with a 'colChart'. There are 2 series of data, a variable number of values each. The problem is that some of the values names are the same, and as this names are the keys of a php array, they are overwritten.

An example:

$chart_data = array(
    'legend' => array(
        'Serie 1',
        'Serie 2'
    ),
    'E' => array($d1, $d2),
    'F' => array($d1, $d2),
    'M' => array($d1, $d2),
    'A' => array($d1, $d2),
    'M' => array($d1, $d2),
    'J' => array($d1, $d2),
    'J' => array($d1, $d2),
    'A' => array($d1, $d2),
    'S' => array($d1, $d2),
    'O' => array($d1, $d2),
    'N' => array($d1, $d2),
    'D' => array($d1, $d2),
);

'M', 'A' y 'J' are more than once, and that's a problem in PHP.

¿Is there any way to do it?

Thank you