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