I have two sets of Y data using the exact same X data.
I have a hovertool in "vline" mode and "nearest" line_policy. It should give the same X value and the same index value for both lines.
With "nearest", I don't think this is true in general. The "nearest" policy means just that, use the nearest point on the line (to the point of intersection) for the inspection. If two different lines have different derivatives, then for a given x position, it is entirely possible for the nearest point on one line is the "previous" point and the nearest point on the other line is the "next" point. I suspect that is what is occurring here. The "prev" or "next" policies would probably provide more "predictable" behavior in these instances.
Thanks,
Bryan
···
I attached two pictures to illustrate this.
On the first picture the index is off by 1 unit and we can see the box is not attached on the same point for the blue line.
On the second picture, I zoomed in, the hover works better.