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