AmCharts Pie - How To Get Slice To Pull Out On RollOverSlice?
I am having a lot of difficulties navigating through amCharts Docs and I cant seem to find the answer to this online. I am using the amCharts pie chart, and I want a couple of thi
Solution 1:
You can not trigger the pullout directly, but there's a method to simulate the clicking on the slice. (see clickSlice)
In addition you have to add another listener for leaving a slice, so it will return to its original state.
chartAsset.addListener('rollOverSlice', function(e) {
chartAsset.clickSlice(e.dataItem.index);
});
chartAsset.addListener('rollOutSlice', function(e) {
chartAsset.clickSlice(e.dataItem.index);
});
Here's the working fiddle.
Another approach would be to change just the visualization of the slice using CSS. An example for this can be found here.
Post a Comment for "AmCharts Pie - How To Get Slice To Pull Out On RollOverSlice?"