File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 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) {
16701670 }
16711671
16721672 // Make sure there is a first point.
1673+ //
16731674 // This ensures there is a calcdata item for every trace,
16741675 // 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.
16761679 if ( ! Array . isArray ( cd ) || ! cd [ 0 ] ) {
16771680 cd = [ { x : false , y : false , placeholder : true } ] ;
16781681 }
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ module.exports = function hoverPoints(pointData) {
4646 dy = Math . abs ( yPx - pos [ 1 ] ) ,
4747 rad = Math . max ( 3 , d . mrc || 0 ) ;
4848
49+ // N.B. d.mrc is the calculated marker radius
50+ // which is only set for trace with 'markers' mode.
51+
4952 return Math . max ( Math . sqrt ( dx * dx + dy * dy ) - rad , 1 - 3 / rad ) ;
5053 }
5154
You can’t perform that action at this time.
0 commit comments