-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to determine precise y-axis mouse position on the stacked bar chart and represent it in the crosshair label #906
Comments
Hi @paulb-elastic we released this new listener at the moment |
@paulb-elastic @markov00 Just tested this out. If it was exposed via a |
Hi team, any update on this? |
🎉 This issue has been resolved in version 31.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
We are using the Elastic Stacked Bar Chart in Uptime to generate a waterfall chart for Synthetic monitors. We are doing this by rotating the standard chart by 90 degrees, so it becomes a horizontal bar chart.
We have a requirement to provide time based information to the user as they move their mouse across the chart. This is based on their mouse position horizontally, which relates to the y-axis on the chart because we have rotated in by 90 degrees.
It is not currently possible to get the precise y-axis position that the user’s mouse is on, which is what we are requesting in this issue.
In addition, we want to label the position of the precise position of the mouse in the crosshair label (https://elastic.github.io/elastic-charts/?path=/story/interactions--crosshair-with-time-axis).
Further details
onPointerUpdate
provides this:{chartId: "51881c65-149a-487c-872a-72de61222410", type: "Over", unit: undefined, scale: "linear", value: CLOSEST_X_VALUE}
so the closest we can get is the closestx
valueonElementOver
provides:Which gets us the
x
,y0
andy
of the closest bar, but not the cursor position.The props passed to the
customTooltip
component also provide information pertaining to the relevant bar, but not the current cursor position.The text was updated successfully, but these errors were encountered: