From c81218f315d61d7798f27007b0634de0e768b1a8 Mon Sep 17 00:00:00 2001 From: Willem van Bergen Date: Tue, 19 Feb 2013 10:39:50 -0500 Subject: [PATCH] Use the formatter that belongs to yAxis of the series to format the y value of a tooltip, instead of basing it on the series chart type. --- src/models/multiChart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/multiChart.js b/src/models/multiChart.js index 52b24d0..fdfe24d 100644 --- a/src/models/multiChart.js +++ b/src/models/multiChart.js @@ -44,7 +44,7 @@ nv.models.multiChart = function() { var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ), top = e.pos[1] + ( offsetElement.offsetTop || 0), x = xAxis.tickFormat()(lines1.x()(e.point, e.pointIndex)), - y = (e.series.bar ? yAxis1 : yAxis2).tickFormat()(lines1.y()(e.point, e.pointIndex)), + y = ((e.series.yAxis == 2) ? yAxis2 : yAxis1).tickFormat()(lines1.y()(e.point, e.pointIndex)), content = tooltip(e.series.key, x, y, e, chart); nv.tooltip.show([left, top], content, undefined, undefined, offsetElement.offsetParent);