Mercurial > hg > webaudioevaluationtool
annotate analysis/analysis.js @ 566:45f5514b5077 Dev_main
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@566 | 1 /* |
n@566 | 2 * Analysis script for WAET |
n@566 | 3 */ |
n@566 | 4 |
n@566 | 5 var chartContext; |
n@566 | 6 window.onload = function() { |
n@566 | 7 // Load the Visualization API and the corechart package. |
n@566 | 8 google.charts.load('current', {'packages':['corechart']}); |
n@566 | 9 chartContext = new Chart(); |
n@566 | 10 } |
n@566 | 11 |
n@566 | 12 function Chart() { |
n@566 | 13 this.data = null; |
n@566 | 14 |
n@566 | 15 this.getValueData = function() { |
n@566 | 16 var XMLHttp = new XMLHttpRequest(); |
n@566 | 17 XMLHttp.parent = this; |
n@566 | 18 XMLHttp.open("GET","comment_parser.php?format=JSON",true); |
n@566 | 19 XMLHttp.onload = function() { |
n@566 | 20 // Now we have the JSON data, extract |
n@566 | 21 this.parent.data = JSON.parse(this.responseText); |
n@566 | 22 } |
n@566 | 23 XMLHttp.send(); |
n@566 | 24 } |
n@566 | 25 |
n@566 | 26 this.drawMean = function() { |
n@566 | 27 // First we must get the value data |
n@566 | 28 } |
n@566 | 29 } |