File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1670,9 +1670,12 @@ plots.doCalcdata = function(gd, traces) {
1670
1670
}
1671
1671
1672
1672
// Make sure there is a first point.
1673
+ //
1673
1674
// This ensures there is a calcdata item for every trace,
1674
1675
// even if cartesian logic doesn't handle it (for things like legends).
1675
- // Tag this artificial calc point with 'placeholder: true'
1676
+ //
1677
+ // Tag this artificial calc point with 'placeholder: true',
1678
+ // to make it easier to skip over them in during the plot and hover step.
1676
1679
if ( ! Array . isArray ( cd ) || ! cd [ 0 ] ) {
1677
1680
cd = [ { x : false , y : false , placeholder : true } ] ;
1678
1681
}
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ module.exports = function hoverPoints(pointData) {
46
46
dy = Math . abs ( yPx - pos [ 1 ] ) ,
47
47
rad = Math . max ( 3 , d . mrc || 0 ) ;
48
48
49
+ // N.B. d.mrc is the calculated marker radius
50
+ // which is only set for trace with 'markers' mode.
51
+
49
52
return Math . max ( Math . sqrt ( dx * dx + dy * dy ) - rad , 1 - 3 / rad ) ;
50
53
}
51
54
You can’t perform that action at this time.
0 commit comments