javascriptcssgoogle-apigoogle-visualizationgoogle-pie-chart

Google Pie Chart: How can I put the tooltip in front of my central div


To undestand better my question take a look here:

http://jsfiddle.net/q5bkuaj2/1/

I am using a Pie Chart of Google's API and I needed to put some informations in piehole center. I looked for some Google options to do that, but I didn't find anything, so I did it by myself with CSS. But now I have a problem, because of de z-index, the tooltip is always back of the central div. What is the best way to fix that?

enter image description here

The chart is rendered in "chart" div:

<div id="chart_wrap">
    <div class="centro_total"><div class="alinhar_middle estilo_total">130<br/>
        <div class="label-total">Total</div>
    </div>
</div>
<div id="chart"></div>


Solution

  • Make the background of the chart transparent, then you may move the "Info" inside the PieHole behind the chart and it's still visible.

    The white background of the chart may be set via the background of #chart_wrap

    http://jsfiddle.net/wqarby07/