Combining them did not work. I have already stripped the resize function.
That did not help either.
I have also tried to insert them separately in <iframe> windows. Again, I
can accomplish multiple pie charts or multiple calendars, but not a mixture
of the two.
Neither chart appears with the code below. If I delete either chunk of code
for each chart, the other populates. I think this is broken and the charts
in package 'corechart' are not compatible with 'calendar'.
There is some conflict elsewhere.
<script type="text/javascript">
function drawChart() {
<?php include_once 'qry_reportCalendar.php';?>
var jArray = <?php echo $jsonTableCalendar; ?>;
var mName = "<?php $machName = ltrim($varMachine, 'm');echo $machName;?>";
var sDate = "<?php echo $varStartDate;?>";
var eDate = "<?php echo $varEndDate;?>";
var dataTable = new google.visualization.DataTable();
dataTable.addColumn({ type: 'date', id: 'Date' });
dataTable.addColumn({ type: 'number', id: 'Running' });
for(var i = 0; i < jArray.length; i++){
dataTable.addRow([ new
Date(jArray[i][0],jArray[i][1],jArray[i][2]),jArray[i][3]]);
}
var chartc = new
google.visualization.Calendar(document.getElementById('calendar1'));
var options = {
title: "Utilization " + mName + ": " + sDate + " to " + eDate,
noDataPattern: {
backgroundColor: '#c9f9c6',
color: '#eeeeee'
},
colorAxis: {colors:['#ffffff','#EC1717','yellow','#35BF2E'],maxValue:100}
};
chartc.draw(dataTable, options);
<?php include_once 'qry_reportPie.php';?>
var data = new google.visualization.arrayToDataTable(<?php echo $jsonTable;
?>);
var options = {
//title:'Utilization',
titleTextStyle: {
bold: true,
fontSize: 20,
color: '#000000'
},
animation: {
startup: false
},
slices: {
0: {color: '#35BF2E'},
1: {color: 'yellow'},
2: {color: '#EC1717'}
},
pieSliceTextStyle: {
color: 'black',
bold: true,
fontSize: 16,
},
pieHole: 0.3,
legend: {
position: 'bottom',
textStyle: {color: '#000000'},
},
width: 300,
height: 300,
backgroundColor: '#ffffff',
};
var chartp = new
google.visualization.PieChart(document.getElementById('pie1'));
chartp.draw(data, options);
}
google.charts.load('current', {packages:['calendar','corechart']});
google.charts.setOnLoadCallback(drawChart);
</script>
>
>
--
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/d1040076-bbf4-4a83-8a5a-46a8279d7307%40googlegroups.com.