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.