我有2个图表但只有一个渲染。我不知道我犯了什么错误。我的代码出了什么问题?你能救我吗?
<script type="text/javascript" src="//www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {'packages':['bar']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable(<?php echo $satisfacao; ?>);
var options = {chart: {title: 'Satisfação'}};
var chart = new google.charts.Bar(document.getElementById('chart_div'));
chart.draw(data, options);
var data1 = new google.visualization.DataTable(<?php echo $clips; ?>);
var options1 = {chart: {title: 'Clippings'}};
var chart1 = new google.charts.Bar(document.getElementById('chart_div1'));
chart1.draw(data1, options1);
}
</script>
<div id='chart_div'></div>
<div id='chart_div1'></div>