numerical25
numerical25

Reputation: 10790

Google Charts works in IE7 but not IE8 or IE9

Having issues with google charts. It works in every browser except IE8 and 9. If I switch to IE 7 or even quirks mode, it works. Here is my javascript

// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {
    'packages': ['ColumnChart']
    });

// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);

// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawChart() {
    var data = new google.visualization.DataTable();
    data.addColumn('string', 'Date');
    data.addColumn('number', 'Affiliate Fees');
    data.addRows([['Sep 05, 2011 - Sep 11, 2011', 224.95], ['Dec 26, 2011 - Jan 01, 2012', 112.69], ['Apr 23, 2012 - Apr 29, 2012', 202.5], ['May 21, 2012 - May 27, 2012', 69.21], ['May 28, 2012 - Jun 03, 2012', 4.05]]);
    var options = {
        'title': '',
        'width': 1150,
        'height': 300,
        'colors': ['#E50278'],
        'fill': 50,
        'wmode': 'opaque'
    };
    // Instantiate and draw our chart, passing in some options.
    var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
    chart.draw(data, options);
}

Upvotes: 2

Views: 6222

Answers (1)

alain.janinm
alain.janinm

Reputation: 20065

You should use the new packages.

Replace 'packages': ['ColumnChart'] with packages:["corechart"].

Upvotes: 3

Related Questions