$(document).ready(function() {
var optcounts1 = <?php echo json_encode($optcountss); ?>;
var options1 = <?php echo json_encode($optionss); ?>;
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var j = <?php echo $i ?>;
for(var x=1; x<=j;x++) {
var p = x-1;
// Create the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
console.log(options1[p]);
var m = 'chart_div'+x;
data.addRows(options1[p]);
var options = {'title':'mi',
'width':400,
'height':300};
var chart = new
google.visualization.PieChart(document.getElementById(m));
chart.draw(data, options);
}
}
});
--
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/edb676e3-f53c-4df9-accd-a0eae8d32276%40googlegroups.com.