Limitations with hoverData and clickData with grouped and stacked bar charts?


One of my graph shows 3 series in a BarChart, for which bars are either stacked or grouped.

When I use hoverData and clickData, the JSON object returns the whole bunch of data for the stacked bars. Is there a way to get the info for the serie on which the mouse is, instead of the bar?

Referring to the above screenshot, I would need to know that the mouse is on y1, not y2, not y3. How can I proceed?

Mmmh, it seems that by default, BarGraph has the options set to “Compare data on hover”, and in such a case the JSON object returned by ‘HoverData’ includes everything.

When the option is set to “Show closest data on hover”, ‘HoverData’ returns only the closest Data, that is, the data related to the bar on which the mouse is.

Problem is, I want to display the bars with option set to “Compare data on hover” and get the data on hover for the bar on which the mouse is…Is there a way to do this?