Forum


Replies: 2   Views: 1572
Chart theme colors
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 netsolution  · 26-08-2020 - 14:23

Hello,

I try to change the colors in a chart and have added the following code (according to documentation):

 

$paramsChart = array(
    'data' => $data,
    'type' => 'barChart',
    'color' => '3',
    'chartAlign' => 'center',
    'sizeX' => '14',
    'sizeY' => '14',
    'legendPos' => 'b',
    'legendOverlay' => '0',
    'border' => '1',
    'hgrid' => '10',
    'vgrid' => '0',
    'groupBar' => 'stacked',
    'theme' => array(
        'valueRgbColors' =>  array(array('4C0099', 'FF0000', 'FF8800','00CC00')),
        'serRgbColors' =>  array(array('4C0099', 'FF0000', 'FF8800','00CC00')),
    )
);

 

But the chart is always displayed in the blue scheme (have also tried to use only serRgbColors or valueRgbColors, but no change)

What is wrong here?

Thanks!