Skip to content

Commit f72389d

Browse files
committed
select the last point as closest if two overlap
1 parent bffdff6 commit f72389d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/traces/scattergl/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ function hoverPoints(pointData, xval, yval, hovermode) {
732732
}
733733
}
734734
} else {
735-
for(i = 0; i < ids.length; i++) {
735+
for(i = ids.length - 1; i > -1; i--) {
736736
ptx = x[ids[i]];
737737
pty = y[ids[i]];
738738
dx = xa.c2p(ptx) - xpx;

0 commit comments

Comments
 (0)