如果你看下面的jsfiddle
右侧的图表不显示弹出窗口。这是为什么?我该如何解决?
google.load('visualization', '1.0', {
'packages': ['corechart']
});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'User');
data.addColumn('number', 'Messages Sent');
data.addRows([
['Amelia', 35],
['John', 1],
['Ted', 3],
['pat', 1]
]);
var data2 = new google.visualization.DataTable();
data2.addColumn('string', 'User');
data2.addColumn('number', 'Messages Sent');
data2.addRows([
['Amelia', 35],
['John', 1],
['Ted', 3],
['pat', 1]
]);
var options = {
'title': 'Ownership',
'width': 250,
'height': 250
};
var options2 = {
'title': 'Ownership',
'width': 250,
'height': 250
};
var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
var chart2 = new google.visualization.PieChart(document.getElementById('chart_div_2'));
chart.draw(data, options);
chart2.draw(data2, options2);
}