|
|
@ -335,7 +335,7 @@ ChartInternal.prototype.horizontalDistance = function(data, pos) { |
|
|
|
}; |
|
|
|
}; |
|
|
|
ChartInternal.prototype.findClosest = function (values, pos) { |
|
|
|
ChartInternal.prototype.findClosest = function (values, pos) { |
|
|
|
var $$ = this, |
|
|
|
var $$ = this, |
|
|
|
minDist, |
|
|
|
minDist = Infinity, |
|
|
|
closest; |
|
|
|
closest; |
|
|
|
|
|
|
|
|
|
|
|
// find mouseovering bar
|
|
|
|
// find mouseovering bar
|
|
|
@ -353,7 +353,7 @@ ChartInternal.prototype.findClosest = function (values, pos) { |
|
|
|
return v && !$$.isBarType(v.id); |
|
|
|
return v && !$$.isBarType(v.id); |
|
|
|
}).forEach(function (v) { |
|
|
|
}).forEach(function (v) { |
|
|
|
var d = $$.horizontalDistance(v, pos); |
|
|
|
var d = $$.horizontalDistance(v, pos); |
|
|
|
if (d < minDist || !minDist) { |
|
|
|
if (d < minDist) { |
|
|
|
minDist = d; |
|
|
|
minDist = d; |
|
|
|
closest = v; |
|
|
|
closest = v; |
|
|
|
} |
|
|
|
} |
|
|
|