let's take this example... how to change colors of those bars?
I know I can change it via renderer but it won't change legend.
I have tried to use:
style: {fill: 'red'}
but it changes color of ever bar
I have tried to put colors in array, its not working.
I have tried to put each style in array, like this:
style: [{fill: 'red'}, {fill: 'green'}, {fill: 'blue'}]
But it won't work either, since I can put titles in array like:
title: ['title1', 'title2', 'title3']
I thought it (styles) should work too but not.
So how can I change color of each "data" bar?
Bar colors are actually determined by the chart's theme:
Ext.create('Ext.chart.Chart', {
theme: 'myTheme'
//the remainder of your code...
});
In order to use custom colors, you will need to extend the existing 'Base' theme, as in the custom area chart example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With