chart not showing in IE8

95 views
Skip to first unread message

Josh Bennett

unread,
Feb 27, 2013, 1:35:19 PM2/27/13
to google-visua...@googlegroups.com
Does anyone know how to the pie chart to show up in IE8?

<!doctype html>
<html>
  <head>
   <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
var pieData = [];
pieData.push(['Task', 'Hours per Day'], ['Work', 11], ['Eat', 2]);
var data = google.visualization.arrayToDataTable(pieData);

        var options = {
  legend: {
  position: 'bottom'
  },
  backgroundColor: 'none'
        };

        var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="chart_div" style="width: 300px; height: 300px;"></div>
<div id="new_chart_div" style="width: 300px; height: 300px;"></div>
  </body>
</html>

This code works great in IE7 and IE9 but once the browsermode is IE8 or the documentmode is IE8 then the chart goes away.

asgallant

unread,
Feb 27, 2013, 2:01:59 PM2/27/13
to google-visua...@googlegroups.com
It works fine in IE 8 for me.
Reply all
Reply to author
Forward
0 new messages