visx icon indicating copy to clipboard operation
visx copied to clipboard

xychart - Control Tooltip nearestDatum

Open TiagoPortfolio opened this issue 3 years ago • 0 comments

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: Screenshot 2021-12-07 at 15 02 44 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!

TiagoPortfolio avatar Dec 07 '21 15:12 TiagoPortfolio