I have a stacked chart with three columns. When a user clicks on one of the pieces in a stack I want to display details for that piece. My code is:
`$(‘#inventory_chart’).on(‘click’, function (event) {
if (event.args) {
data=inventoryData[event.args.elementIndex];
var prodcat=data[“prodcat”];
var family=data[“family”];
showProdCat_exec(prodcat,family);
}
});
No matter which piece I click on, the elementIndex is returning 0, 1, or 2 which is the column number. How can I get the index of the actual piece clicked on? Or can I get to the tooltip label? When the tooltip appears, the correct information is shown. If I can get to that, I can make it work.