This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DataConverterContainer extends Component { | |
| getDatasetfromJsonData(jsonData){ | |
| return jsonData[0].scores; | |
| }; | |
| getLabels(dataset){ | |
| return Object.keys(dataset) | |
| }; | |
| getData(dataset){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 16 lines (14 sloc) 0.36 kB | |
| function average(data) { | |
| /*Can't find an average function in JS, made one | |
| This function is able to handle null values!!!*/ | |
| var count = null; | |
| var sum = null; | |
| for (i=0; i<data.length; i++) { | |
| if (data[i]) { | |
| count++; |
NewerOlder