Hi,
i am using phpdocx13 premium and i am building a radarchart, a bar chart and a linechart. however i am not able to use custom colors in the line and radarchart.
the examples provided dont have a linechart example included.
the colors do work with a colChart but not with a lineChart and not with a radarChart.
can you provide a simple example with that chart types?
$data = [
'legend' => array('Series 1', 'Series 2'),
'data' => array(
array(
'name' => '2019',
'values' => array(10, 7),
),
array(
'name' => '2020',
'values' => array(20, 60),
),
array(
'name' => '2021',
'values' => array(50, 33),
),
array(
'name' => '2022',
'values' => array(25, 2),
),
array(
'name' => '2023',
'values' => array(20, 8),
)
)
];
$params = [
'data' => $data,
'color' => 3,
'sizeX' => 8,
'sizeY' => 3.3,
'legendPos' => 'none',
'type' => 'colChart',
'hgrid' => 1,
'vgrid' => 1,
'stylesTitle' => [
'bold' => true,
'fontSize' => 750
],
'theme' => [
'serRgbColors' => ['FF0000', '00FF00']
]
];
$docx->addChart($params);