bounds calculation also requires a linear scan
But not whenever the mouse moves. And as far as I understand, the bounds are updated automatically whenever new data are added - so no "scanning" involved.
What I wanted to say is that this caching may theoretically be omitted by some exotic source. For example, currently the caching is not efficient for multi-valued sources.
Anyway, implemented boundary check in r38478.
The general case of XY distance measurement is very exotic because 99% of all charts plot different quantities on x and y axes -- the geometrical distance between the points (2010, 1Million $) and (2011, 2 Million$) is meaningless. Therefore I would not consider it seriously. BTW, as proposed some time ago, the default value of MeasureMode should not be cdmXY for the same reason.
I disagree. For example, my experience of using similar tools, limited as it is,
tells that measurement is mostly useful in scatter, GIS-oriented and other scientific plots with meaningful 2d distances, since measuring a single-axis distance is easily performed "mentally", and so does not need a specialized tool.
I am NOT saying that I am right "statistically", but only that I find your anecdotal evidence not convincing enough. We need at least a third person

After some experiments, I have implemented yet another variant of optimization, which works for all distance modes is and asymptotically logarithmic, but is based on a heuristic (i.e. may return wrong results). Basically it supposes that the data is "smooth enough" so that hierarchical gradient search will find the global minimum.
I am not 100% sure if it is useful, so attach it as a patch instead of committing.
After applying the patch you can control this algorithm by
changing constant in the "p.FApproxLevel := 10" line of TDataPointTool.FindNearestPoint.
Also, you can insert "exit(true)" as a first line of InBoundaryBox function
to disable the previous optimization so as to not obscure the effect of this one.
Questions are:
1) Should this optimization be committed?
2) If yes, should the interface be published?
3) If yes, what should that interface be?
One reason why I introduced the locking mechanism was because the distance tool does not know which axes it should use to calculate axis units.
Was that "the only one reason" or "one of (several) reasons"?
I am thinking about a way to provide this information in a different way, like properties AxisIndexX, AxisIndexY for the distance tool. But what if we have several axes in the same direction but with different transformations?
Consider a chart with several overlapping series assigned to different axises.
If user wants to measure distance in dpmFree mode, but always on one specific axis,
he currently can not do that.
AxisIndex properties might help this case, but, as you noted, will result in trouble
for the case of multiple non-overlapping axises.
One compromise may be to implement a new mode, which dos not snap the tool to the nearest point, but still uses FindNearest (possible with increased GrabRadius) to find a series for the purpose of axis transformation.