Hello again @vamsi!
Here's how the
sliceout()
function should look like for it to work with both pie and pie3d charts; it has an extra step for pie 3d ones.
function Sliceout(chart) {
var store = chart.getStore(),
record = store.findRecord("Month", "Apr"),
record_id = store.indexOf(record),
series = chart.getSeries()[0],
series_item = series.getItemByIndex(record_id),
spids = [],
first_sprite, last_sprite, sprites, sprites_per_rec;
if (Ext.getClassName(series) == "Ext.chart.series.Pie3D") {
sprites_per_rec = series.spritesPerSlice;
first_sprite = record_id * sprites_per_rec;
last_sprite = first_sprite + sprites_per_rec;
sprites = series.getSprites();
series_item.sprite = sprites.slice(first_sprite, last_sprite);
}
chart.setHighlightItem(series_item);
}
This should work with your provided test case; notice the "Apr" constant value in the third line of the code above; you probably want to replace that to the record you want to highligh.
Hope this helps!