File: Template/Gauge.phtml

Recommend this page to a friend!
  Classes of Tom Schaefer  >  QGoogleVisualizationAPI 2009  >  Template/Gauge.phtml  >  Download  
File: Template/Gauge.phtml
Role: Auxiliary script
Content type: text/plain
Description: Sample Gauge Template
Class: QGoogleVisualizationAPI 2009
Generate charts with Google Visualization API
Author: By
Last change:
Date: 12 years ago
Size: 823 bytes


Class file image Download
<script src="<?php echo Google_Visualization::APISCRIPT; ?>"></script>
var cObj = <?php echo $configObject;?>;
var dataObj = <?php echo $dataObject->getData()?>;
var dtTable;
function draw() {
  var data = new google.visualization.DataTable(dataObj);
  var eStr = 'new '+cObj.provider+'.'+cObj.scope+'.'+cObj.type+'(document.getElementById("'+cObj.port+'"))';
  visualization = eval(eStr);
  visualization.draw(data, cObj.props);
function changeTemp(dir) {
   dtTable.setValue(0, 0, dtTable.getValue(0, 0) + dir * 25);
   dtTable.setValue(0, 1, dtTable.getValue(0, 1) + dir * 20);
   visualization.draw(dtTable, cObj.props);

google.load(cObj.scope, cObj.version,{'packages': [cObj.type.toLowerCase()], 'language':cObj.language});

For more information send a message to info at phpclasses dot org.