krzysu / flot.tooltip

tooltip plugin for wonderful Flot plotting library
https://github.com/krzysu/flot.tooltip
187 stars 153 forks source link

Tooltip showing under content when using a Pie Chart #147

Closed mortenbirkelund closed 7 years ago

mortenbirkelund commented 7 years ago

Hi

I have a weird problem where the Tooltips are not visible whenever I have a pie chart on the screen. Whenever the pie chart is not rendered (if i make an error in the code for rendering it) then the tooltips are showing perfectly fine for all the other charts. But whenever the Pie Chart is rendered then the tooltip is shown underneath the content. You can see the error in the first and second image, and in the third you can see what happens whenever i make an error in the code for the Pie Chart, so that it is not rendered.

1

2

3

Any quick fix for this problem?

krzysu commented 7 years ago

my first thought is to check CSS z-index of your chart and tooltip

mortenbirkelund commented 7 years ago

Found the problem. Commenting out the following options in the piechart solved the problem. Not exactly sure why...

//defaultTheme: false

krzysu commented 7 years ago

that means you are using now the defaultTheme of tooltip, what sets z-index to default value. defaultTheme is just some default CSS styling for your tooltip

mortenbirkelund commented 7 years ago

Thanks for the explanation. Hope this can help other with similar problem.