PDA

View Full Version : Configure chart legend interactions programmatically



Naga
10 Jan 2012, 3:53 AM
When a chart is created with legend, automatically legend interactions will be enabled. So user can tap on a legend item to hide/show a respective series in chart.

My requirement is, by default few series in chart should be hidden and respective legend items should be shown as grayed. So programatically, i should be able to hide those series and set respective legend items as grayed.

How i can achive this functionality? Please let me know, what APIs I can use to achive this.

Thanks in advance,
Nag

mitchellsimoens
10 Jan 2012, 6:12 AM
There really isn't an interaction or event. You can hook into Ext.chart.series.Series#hideAll and showAll to seta n attribute to the legend item.