PDA

View Full Version : chart setSeriesStylesByIndex



Richie1985
23 Oct 2009, 4:00 AM
Hi,

i want to do something like this:

http://developer.yahoo.com/yui/examples/charts/charts-hideseries.html

there it is possible with the function setSeriesStylesByIndex to hide specified series.

how can i make this in ext 3.0?

there i dont find this function.

thx

Condor
23 Oct 2009, 5:48 AM
Ext.override(Ext.Chart, {
setSeriesStylesByIndex: function(index, styles){
this.seriesStyles = this.seriesStyles || [];
this.seriesStyles[index] = styles;
this.swf.setSeriesStylesByIndex(index, Ext.encode(styles));
}
});

Richie1985
26 Oct 2009, 1:05 AM
it dont work, il become this firebug error:

this.swf.setSeriesStylesByIndex is not a function



Ext.override(Ext.chart.ColumnChart, {
setSeriesStylesByIndex: function(index, styles){
this.seriesStyles = this.seriesStyles || [];
this.seriesStyles[index] = styles;
this.swf.setSeriesStylesByIndex(index, Ext.encode(styles));
}
});

thx

Condor
26 Oct 2009, 1:23 AM
Was this method added in the YUI 2.8.0r4 release?

In that case you would need to upgrade the charts.swf (http://www.extjs.com/forum/showthread.php?t=82458).

Richie1985
26 Oct 2009, 1:40 AM
thanks, it works!