disabled hovering on stackedArea chart when the point has 0 value.. or very close to 0

master-patched
Bob Monteverde 12 years ago
parent c79ca5c761
commit 4737ead469

@ -2634,6 +2634,12 @@ nv.models.stackedAreaWithLegend = function() {
*/
stacked.dispatch.on('pointMouseover.tooltip', function(e) {
//disable tooltips when value ~= 0
if (!Math.round(getY(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
return false;
}
dispatch.tooltipShow({
point: e.point,
series: e.series,

2
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

@ -124,6 +124,12 @@ nv.models.stackedAreaWithLegend = function() {
*/
stacked.dispatch.on('pointMouseover.tooltip', function(e) {
//disable tooltips when value ~= 0
if (!Math.round(getY(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
return false;
}
dispatch.tooltipShow({
point: e.point,
series: e.series,

Loading…
Cancel
Save