From 0bf2cefff3644852119f5f739208b46779d0db42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6khan=20=C3=96zen?= Date: Thu, 4 Feb 2016 14:44:50 +0100 Subject: [PATCH] wrong tooltip position for gauges fixed --- src/tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tooltip.js b/src/tooltip.js index ce76601..986c94c 100644 --- a/src/tooltip.js +++ b/src/tooltip.js @@ -80,7 +80,7 @@ c3_chart_internal_fn.tooltipPosition = function (dataToShow, tWidth, tHeight, el // Determin tooltip position if (forArc) { tooltipLeft = (($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2) + mouse[0]; - tooltipTop = ($$.height / 2) + mouse[1] + 20; + tooltipTop = ($$.hasType('gauge') ? $$.height : $$.height / 2) + mouse[1] + 20; } else { svgLeft = $$.getSvgLeft(true); if (config.axis_rotated) {