I need to disable some legend items in chart on my button click. I think I should call the action that toggle legend item, but I don't know how to do it.
Please, help.
var arr = ['ext-chart-series-bar-1','ext-chart-series-bar-2'];
Ext.each(chart.legend.store.data.items, function(item) {
if ((type == 'line') && (item.data.series in arr)){
item.itemclick(); // it doesn't work
}
})