有谁知道为什么这个谷歌图表不会在 IE 8 中呈现?它在其他浏览器中运行良好
$(function () {
var trendChartWidth = 670;
var data = new google.visualization.DataTable();
data.addColumn('string', '');
data.addColumn('number', '');
data.addRows([
['Group 1', 168],
['Group 2', 83],
['Group 3', 1680]
]);
var options = {
'title': 'Stuff (Last 30 Days)',
'width': 210,
'height': 170,
'backgroundColor': '#F2F2F2',
colors: ['#94b709', '#4f4840', '#bcbcbc'],
chartArea: { left: 10, top: 30, width: '100%', height: '75%' },
legend: { position: 'none' }
};
var chart = new google.visualization.PieChart(document.getElementById('chartTest'));
chart.draw(data, options);
});
这是我的图表 div:
<div id="chartTest" style="width:300px;height:300px;border:1px solid red;"></div>