Browse Source

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.
pull/480/head
Jeroen Janssen 10 years ago
parent
commit
90f5a992db
  1. 2
      c3.js

2
c3.js

@ -2063,7 +2063,7 @@
if (tooltipRight > chartRight) { if (tooltipRight > chartRight) {
tooltipLeft -= tooltipRight - chartRight; tooltipLeft -= tooltipRight - chartRight;
} }
if (tooltipTop + tHeight > getCurrentHeight()) { if (tooltipTop + tHeight > getCurrentHeight() && tooltipTop > tHeight + 30) {
tooltipTop -= tHeight + 30; tooltipTop -= tHeight + 30;
} }
} }

Loading…
Cancel
Save