Mouse Hover over XY chart to obtain the X axis value

I have a xy chart, like below.
When the mouse hovers over each bar, is there any way I can obtain the x axis value (1....44) of the bar?
Not sure which event should I trigger on the XY chart?

Have a look at what I wrote in the link below. In my case the X-axis value was a date. It looks like you are using a category so you may need to experiment.

See the link to the AM Charts documentation for further ideas.

1 Like

Thanks. I went through your post, it works well for the tooltip modification. After adding the {categoryX} I can see the index value when hovering over each bar.

But I have difficulty to take out the {categoryX} value, which is the index value I want to take, and link this value to a separate label component.

I tried to link the property or creating a custom property, to link the tooltip text, it shows only the static string "{categoryX}", not the actual value.

See my answer to your duplicate question.

1 Like

Thanks.

It looks like there is no way to extract the {categoryX} value from the XY chart.

get some idea from the following post.

by enabling the selection, I can now get the index value.
the format is:

../XYChart.props.selection.data[0].index

image

I never spotted that before - and I've used XY Chart many times.
It looks like you have to actually select - not just hover.

Thanks for the update.