Reputation: 27
i have a spline series. its color is blue. depending on some condition i want to change the color of it to green or red. how to do that. i tried the following way but it didn't work
var rawChart = Ext.ComponentQuery.query('kpiprojectrawvaluechart')[0];
var upperSeries = rawChart.series[0];
var lowerSeries = rawChart.series[2];
if(status == 'danger'){
upperSeries.color = 'red';
}
else {
upperSeries.color = 'green';
}
rawChart.refresh();
please help me
Upvotes: 0
Views: 1696
Reputation: 14877
You can do using:
chart.series[0].graph.attr('stroke', 'green');
Here is the fiddle link : http://jsfiddle.net/mhardik/BCH9t/
Upvotes: 1