I didn't post the full code with both charts... see below
 

> <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/1fd51c08-89da-420d-b081-5c22e1c73c4a%40googlegroups.com.

Reply via email to