I don't like to ask for help but now I think it's time since everything 
seems to be coded as the Google Guide recommends. What's wrong with my 
code? Only the first chart appears. Thank you for help.

<html>
  <head>
<script type='text/javascript' 
src='https://www.gstatic.com/charts/loader.js'></script>
    <script type='text/javascript'> 
  google.charts.load('current', {packages:['corechart']});
  google.charts.setOnLoadCallback(draw1);
  google.charts.setOnLoadCallback(draw2);
      function draw1() {
        var data = google.visualization.arrayToDataTable([
          ['Food', 'Amount'],
          ['1',     15],
          ['2',      33],
          ['3',  8],
          ['4', 12],
          ['5',    27]
        ]);

        var options = {
          is3D: true,
  pieSliceText: 'value',
  legend: {textStyle: {color: 'AEAEAE'}},
   tooltip: { text: 'value'}
        };

        var chart = new 
google.visualization.PieChart(document.getElementById('piechart_3d'));
        chart.draw(data, options);
}
function draw2() {
var data2 = google.visualization.arrayToDataTable([
          ['Rating', 'Amount'],
          ['7',     4],
          ['6',      6],
          ['5',  7],
          ['4', 5],
          ['3',    3]
        ]);

var options2 = {
          pieHole: 0.6,
  legend: {textStyle: {color: 'AEAEAE'}}
        };

        var chart2 = new 
google.visualization.PieChart(document.getElementById('chartdonut'));
        chart2.draw(data2, options2);
      } 
    </script>
</head>
<body>
<div id='piechart_3d' class='chart' style='width: 500px; height: 
500px;'></div>
<div id='chartdonut' class='chart' style='width: 500px; height: 
500px;'></div>
</body>
</html>


-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/8cdf1cb8-fc88-4bc5-8a99-800f67a1936f%40googlegroups.com.

Reply via email to