Posted 26 July 2021, 7:39 am EST
apply custom colors to pivot chart, how we can do?
Forums Home / Wijmo / General Discussion
Posted by: spathi on 26 July 2021, 7:39 am EST
Posted 26 July 2021, 7:39 am EST
apply custom colors to pivot chart, how we can do?
Posted 27 July 2021, 12:34 am EST
Hi,
You can use the palette property of FlexChart. You can get the underlying instance of FlexChart from pivotChart property flexChart. To show custom colors in pivotChart you can pass the array contains strings that represent CSS colors to the palette property, each color is used for each series in the chart. Please refer to the API for more details:
https://www.grapecity.com/wijmo/api/classes/wijmo_chart.flexchart.html#palette
You may also refer to the code snippet and sample link below:
pivotChart.flexChart.palette = [
'blue',
'skyblue',
'rgba(153,51,204,1)',
'rgba(255,136,0,1)',
'rgba(204,0,0,1)',
'rgba(0,204,163,1)',
];
https://stackblitz.com/edit/js-ndqyej
Regards,
Ashwin