Get attributes from the selected SVG element of a chart

In Vaadin charts, when an element is selected (clicked) how can you access the SVG element that was selected? So let’s say you are looking at a bar chart. You hover over one of the bars. It gives you the tool tip that gives you the axis category and the series amount. If you click on that bar, can you get the click to return the SVG element, or a pointer to it, or an attribute of it?

Hi,

Have you tried adding PointClickListener to your chart? That should provide both the data series and the index of the point so you can get the value etc in your Java code.

Check sources of
this example
, it uses PointClickListener to remove points that are clicked. Works in same manner with bar charts.

cheers,
matti

Thanks Matti,

I think that is exactly what I was looking for.