@@ -9,8 +9,8 @@ var getLineWidth = require('./helpers').getLineWidth;
99var hoverLabelText = require ( '../../plots/cartesian/axes' ) . hoverLabelText ;
1010var BADNUM = require ( '../../constants/numerical' ) . BADNUM ;
1111
12- function hoverPoints ( pointData , xval , yval , hovermode ) {
13- var barPointData = hoverOnBars ( pointData , xval , yval , hovermode ) ;
12+ function hoverPoints ( pointData , xval , yval , hovermode , opts ) {
13+ var barPointData = hoverOnBars ( pointData , xval , yval , hovermode , opts ) ;
1414
1515 if ( barPointData ) {
1616 var cd = barPointData . cd ;
@@ -24,7 +24,7 @@ function hoverPoints(pointData, xval, yval, hovermode) {
2424 }
2525}
2626
27- function hoverOnBars ( pointData , xval , yval , hovermode ) {
27+ function hoverOnBars ( pointData , xval , yval , hovermode , opts ) {
2828 var cd = pointData . cd ;
2929 var trace = cd [ 0 ] . trace ;
3030 var t = cd [ 0 ] . t ;
@@ -67,6 +67,8 @@ function hoverOnBars(pointData, xval, yval, hovermode) {
6767 } ;
6868
6969 function inbox ( _minPos , _maxPos , maxDistance ) {
70+ if ( opts . finiteRange ) maxDistance = 0 ;
71+
7072 // add a little to the pseudo-distance for wider bars, so that like scatter,
7173 // if you are over two overlapping bars, the narrower one wins.
7274 return Fx . inbox ( _minPos - posVal , _maxPos - posVal ,
0 commit comments