vega-lite
vega-lite copied to clipboard
Projected nearest should not need a Voronoi transform
A common interaction is to show a line chat with a line for a tooltip at the x-location of some data. https://vega.github.io/vega-lite/examples/interactive_multi_line_pivot_tooltip.html is an example of such a chart and it uses a projected nearest selection. Since we only need to find the closest point on x, we don't really need a full Voronoi tessellation of the space. We could find the closest point with just a binary search (assuming the data is sorted) for example.
@arvind am I missing something here? Voronoi seems overkill for the simple case of finding the nearest point along an axis.