Reputation: 183
Because of the CSP, I need to use Styled mode on highcharts and I need a specific color theme.
I try css but after 10 bar/piece of pie chart, class restart to 0
highcharts-point highcharts-color-9 -> highcharts-point highcharts-
color-0
Before styled mode, I have this array of color:
$ob->colors = array("#0017ff","#00a2ff","#7400ff","#ff4500","#ffd100","#00c33d","#f93078","#0bdcc4","#d26bfa","#feaa10","#00ff45","#d1ff00","#96a7d6",
"#454d1e","#637d6f","#30b2d7","#28e743","#ebab1b","#a6219b","#1da4b9","#3d1fb0","#947a46",
"#73bceb","#b21cc0","#f8e809","#436e39","#a90650","#3c68b5","#7f76a5","#d68f03","#c9f7cd","#4de457","#9a303b","#401156","#124c38","#f0fa84",
"#493b8a","#7ef2f9","#a10ce9","#a3b931","#763f1c","#c97539","#9a8b58","#9e503e","#144d87","#5f3a1d","#15331b","#b91eee","#c6bf2f","#3e165c",
"#a864e7","#f784d4","#21887e",'#228B22','#556B2F','#6B8E23','#808000','#BDB76B','#B8860B','#FFA500','#D2691E','#8B4513','#4682B4','#8B0000',
'#008B8B','#5F9EA0','#4169E1','#8D38C9','#9E7BFF','#153E7E','#7D053F','#E4317F','#FF00FF','#7E587E','#E0FFFF','#228B22','#556B2F','#6B8E23',
'#808000','#BDB76B','#B8860B','#FFA500','#D2691E','#8B4513','#4682B4','#8B0000','#008B8B','#5F9EA0','#4169E1','#8D38C9','#9E7BFF','#153E7E',
'#7D053F','#E4317F','#FF00FF','#7E587E','#E0FFFF');
http://jsfiddle.net/yn2Lcbrm/ Look here, after, Mellon bar class is highcharts-point highcharts-color-0. Can I do something in css or extend limit of 9 to an another limit?
Upvotes: 1
Views: 48
Reputation: 39069
You need to increase the colorCount
property:
chart: {
...,
colorCount: 20
},
Live demo: http://jsfiddle.net/BlackLabel/fjk9qub2/
API Reference: https://api.highcharts.com/highcharts/chart.colorCount
Upvotes: 2