Forum


Replies: 1   Views: 2014
Issue with & in the array
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 dev@ram  · 12-09-2017 - 14:50

Hi,

I'm trying to create a doughnut chart but there is an issue.

The array structure given to  addChart() is shown below:

It seems the '&' in one of the keys corrupts the document (it's generated but the repair dialog shows on opening). Any idea how to fix this? (the chart generates if we remove that key)

Please help. We are using a paid version.

Array
(
    [data] => Array
        (

            [O&M SA] => Array
                (
                    [0] => 472
                )

             [All Others] => Array
                (
                    [0] => 850
                )

        )

    [type] => doughnutChart
    [color] => 18
    [sizeX] => 15
    [border] => 1
    [sizeY] => 12
    [chartAlign] => center
    [showPercent] => 1
    [font] => Arial
    [title] => Graph title
)