visx
visx copied to clipboard
xychart - Control Tooltip nearestDatum
Hi all! 👋
The Tooltip component has the renderTooltip
prop which is a function that already has the nearesDatum
in tooltipData
argument.
I am working on a chart similar to this:
And I found the need to control the selected
nearestDatum
.
In the chart I shared, the tooltip changes the nearestDatum
as soon as a new point is closer than the previous one but I want the nearestDatum
to only be updated once the mouse cursor X is equal or over the X value of a data point.
I hope that makes sense...
Are there plans to invert the control on this so we can control the nearestDatum
?
Cheers!