This page demonstrates a simple approximate algorithm for finding the closest point on any given SVG path element.
A coarse linear scan of the path provides an initial guess. Then, a binary search improves the guess to the desired level of precision (here, about 1px). To account for kinks in the path that can cause the binary scan to get stuck in a local minimum, the coarseness of the initial scan is dependent on the number of path segments. I doubt this algorithm is provably correct, but it seems to produce fairly good results even for the kinky path shown above. This technique is based on Mike Kamermans’ excellent Primer on Bézier Curves.
Knowing the closest path to a given point is useful for multi-line charts in the same way the Voronoi tessellation is useful for scatterplots: it makes it easier to select or highlight elements using the mouse. Instead of requiring the user to hover over a line