Is it possible to define the colors of the lines in a multi line chart? If so, how do you do it?
I tried to change the color of a graph by adding , ['color' => '#aa0000'] to every data of one series, sadly doesn't work.
I have piechart next to this chart and would like to use the same colors for consistency. (See the images for visualization)
The code of these graphs is this:
//PieChart
$accountSplitChart = (new PieChartModel())
->setTitle(_i('User by Type'))
->setOpacity(1)
->addSlice(_i('Employees and admins'), count(User::whereUserType(0)->get()), '#944ebd')
->addSlice(_i('Trainees'), count(User::whereUserType(1)->get()), '#76bd4e')
->addSlice(_i('Farmer'), count(User::whereUserType(2)->get()), '#bd714e');
I want to change the turquoise line to the brown shade to the pie chart, same for the other one, where it's blue to green.
Would be helpful for anyone who doesn't want to stick with the default color.
Is it possible to define the colors of the lines in a multi line chart? If so, how do you do it? I tried to change the color of a graph by adding
, ['color' => '#aa0000']
to every data of one series, sadly doesn't work. I have piechart next to this chart and would like to use the same colors for consistency. (See the images for visualization)The code of these graphs is this:
I want to change the turquoise line to the brown shade to the pie chart, same for the other one, where it's blue to green. Would be helpful for anyone who doesn't want to stick with the default color.