google.charts.load("current", {packages:["corechart"]});
      google.charts.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([

          ['Marga', 'Jumlah'],

          <?php 
            while($user_data = mysqli_fetch_array($result)){
            	extract($user_data);
            	$ww =$ok->count($user_data['id_toga']);
            	echo "['{$nama_toga}',".$ww."],";
            } 
            
          ?>


          // ['Work',     11],
          // ['Eat',      2],
          // ['Commute',  2],
          // ['Watch TV', 2],
          // ['Sleep',    7]
        ]);

        var options = {
          title: 'My Daily Activities',
          is3D: true,
        };

        var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
        chart.draw(data, options);
      }