Note that there are some explanatory texts on larger screens.

plurals
  1. POHighCharts Pie Chart tooltips not showing on hover
    text
    copied!<p>I have a highCharts Pie Chart that when using the fiddle shows the tooltips on mouseOver for data points just fine, as well as the click events when I click on a LegendItem or the pop-out effect of pie slices, but when I plug my code into my site it doesn't work on any version of IE or google chrome. I don't know what the deal is. Here's the tooltips working, as well as the click events, but none of them work in my code.</p> <p><a href="http://jsfiddle.net/hAnCr/" rel="nofollow">http://jsfiddle.net/hAnCr/</a></p> <pre><code>$("document").ready( function(){ $('#container').highcharts({ chart:{ type:'pie', height: 250, width: 350 }, colors:[ '#5485BC', '#AA8C30', '#5C9384', '#981A37', '#FCB319', '#86A033', '#614931', '#00526F', '#594266', '#cb6828', '#aaaaab', '#a89375' ], title:{text: null}, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', showInLegend: true, dataLabels: { enabled: false, formatter: function() { return this.percentage.toFixed(2) + '%'; } }, } }, legend: { enabled: true, layout: 'vertical', align: 'right', verticalAlign: 'middle' }, series: [{ type: 'pie', dataLabels: { }, data: [ ['Domestic Equity', 38.5], ['International Equity', 26.85], ['Other', 15.70], ['Cash and Equivalents', 10.48], ['Fixed Income', 8.48] ] }] }); }); </code></pre> <p>A second question I had was if I could do a switch statement within the data, basically create a function that passes in 1 parameter and depending on the parameter value, change up my data[] values?</p> <p>Thanks for your help, NickG</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload