dygraphs icon indicating copy to clipboard operation
dygraphs copied to clipboard

Crosshair plugin - last point selection edge case visual fix

Open n-gist opened this issue 2 years ago • 0 comments

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

crhLastpoint

I thought about several solutions, but it seems like just fixing the edge case fits best

n-gist avatar May 20 '23 13:05 n-gist