I want to show a cursor on the point nearest to the mouse cursor. This will be used to select datapoints on an XY graph. It seems simple, just use the Map Coords to XY method and get the distance of this XY position to each graph point and take the minimum. The x-axis is on log scale, so I take the log base 10 on the x-values.
The subvi:
It almost works, it's just a little off. In the below example, clearly the nearest point is not selected.
Is my calculation wrong? Am I missing something else?