n@566: /* n@566: * Analysis script for WAET n@566: */ n@566: n@566: var chartContext; n@566: window.onload = function() { n@566: // Load the Visualization API and the corechart package. n@566: google.charts.load('current', {'packages':['corechart']}); n@566: chartContext = new Chart(); n@566: } n@566: n@566: function Chart() { n@566: this.data = null; n@566: n@566: this.getValueData = function() { n@566: var XMLHttp = new XMLHttpRequest(); n@566: XMLHttp.parent = this; n@566: XMLHttp.open("GET","comment_parser.php?format=JSON",true); n@566: XMLHttp.onload = function() { n@566: // Now we have the JSON data, extract n@566: this.parent.data = JSON.parse(this.responseText); n@566: } n@566: XMLHttp.send(); n@566: } n@566: n@566: this.drawMean = function() { n@566: // First we must get the value data n@566: } n@566: }