From 90f5a992dbbd1feaa052297b4a7d0a406be0f9c9 Mon Sep 17 00:00:00 2001 From: Jeroen Janssen Date: Tue, 5 Aug 2014 18:06:47 +0200 Subject: [PATCH] Fix disappearing tooltips with lots of segments. This fixes an issue with tooltips disappearing when graphs are close to the top of the page and have lots of segments, causing them to be bigger than the chart height. --- c3.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c3.js b/c3.js index 0962045..5445300 100644 --- a/c3.js +++ b/c3.js @@ -2063,7 +2063,7 @@ if (tooltipRight > chartRight) { tooltipLeft -= tooltipRight - chartRight; } - if (tooltipTop + tHeight > getCurrentHeight()) { + if (tooltipTop + tHeight > getCurrentHeight() && tooltipTop > tHeight + 30) { tooltipTop -= tHeight + 30; } }