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