dygraphs
dygraphs copied to clipboard
Crosshair plugin - last point selection edge case visual fix
Crosshair draws its lines at position +0.5 of pixel size to get crisp lines, but if the selected point is at the end of graph, this results in drawing the line off-graph. To avoid this and get the line visible, the rightGap option has to be set 1+.
Below is two graphs, which has rightGap = 1 and 0 respectively
I thought about several solutions, but it seems like just fixing the edge case fits best