annotate analysis/analysis.js @ 1223:07c997c0e22a

Initial start to analysis pages
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Tue, 23 Feb 2016 17:56:23 +0000
parents
children 04a64127ebd0
rev   line source
n@1223 1 /*
n@1223 2 * Analysis script for WAET
n@1223 3 */
n@1223 4
n@1223 5 var chartContext;
n@1223 6 window.onload = function() {
n@1223 7 // Load the Visualization API and the corechart package.
n@1223 8 google.charts.load('current', {'packages':['corechart']});
n@1223 9 chartContext = new Chart();
n@1223 10 }
n@1223 11
n@1223 12 function Chart() {
n@1223 13 this.data = null;
n@1223 14
n@1223 15 this.getValueData = function() {
n@1223 16 var XMLHttp = new XMLHttpRequest();
n@1223 17 XMLHttp.parent = this;
n@1223 18 XMLHttp.open("GET","comment_parser.php?format=JSON",true);
n@1223 19 XMLHttp.onload = function() {
n@1223 20 // Now we have the JSON data, extract
n@1223 21 this.parent.data = JSON.parse(this.responseText);
n@1223 22 }
n@1223 23 XMLHttp.send();
n@1223 24 }
n@1223 25
n@1223 26 this.drawMean = function() {
n@1223 27 // First we must get the value data
n@1223 28 }
n@1223 29 }