Hello @Vamsi!
Thanks for providing the test case. It seems you weren't sure how to get the item to be highlighted in the charts? Just providing
"Apr"
is very very misleading (for the application) as there are so many places to look for it. Besides, in the documentation, it says the parameter
"must be the one that you get from item events". Which well, I agree does not help much.
In turn, the example using it suggests how you can get that given a record. Well again, in a misleading way, because it names the record as
storeItem (
this is the exact location in the example pointed in our last post). While a record is an item within a store, this makes a little harder to infer we're talking about store records there.
Now, knowing that what we need is a
record from the chart store, all that's left is just a
App.Chart1.getStore().findRecord("Month", "Apr")
, and voila, puzzle solved!
Still confused? Here's how a working version of your client-side method would look like:
function Sliceout() {
var chart = App.Chart1,
store = chart.getStore(),
record = store.findRecord("Month", "Apr"),
record_id = store.indexOf(record),
series = chart.getSeries()[0],
series_item = series.getItemByIndex(record_id);
chart.setHighlightItem(series_item);
}
And that's about it! Hope this helps!