user3908735 user3908735 - 4 months ago 152
Javascript Question

Chart.js - setting tooltip z-index

http://jsfiddle.net/gmannib/j2mwpj43/7/

^ See the sample fiddle above. Notice how the tooltips for the piechart go underneath the "earth" icon I have in the middle there? Is there a way to set the z-index property of the tooltips to be above the earth icon? I thought this would work?

race.tooltip.style.zIndex = "5";


I'm still learning...thank you for your kind help!

Answer

just give higher z-index value to your canvas and you are done. See DEMO.

CSS Code

canvas#race{position:relative; z-index:1;}