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