2
谷歌图表存在问题。它适用于除IE8和9以外的所有浏览器。如果我切换到IE 7或甚至是怪异模式,它就可以工作。这是我的javascript谷歌图表适用于IE7,但不适用于IE8或IE9
// 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);
}
如果你使用新软件包''package:[“corechart”]'而不是'packages':['ColumnChart']',它会更好吗? –
我认为那样做了!谢谢 – numerical25
我可能说得太快了。它现在在IE9中工作。但它没有出现在IE 8中。如果我在文档模式IE 9中使用它,但它很快就会工作,但一旦我将其更改为IE8标准,它就会中断。 – numerical25