ONSvisual / Simple-charts

Simple responsive charts
17 stars 12 forks source link

Use nearest line rather than nearest point for bump chart mouseover #108

Open jtrim-ons opened 1 year ago

jtrim-ons commented 1 year ago

The existing version uses Voronoi polygons on the set of points for mouseover. This can mean that when you hover on a sloped line, it highlights another line instead.

The new version highlights the closest line to the mouse pointer, as measured by vertical distance.

jtrim-ons commented 1 year ago

Should we do this for slope charts too?