changed the x axis data to numbers

This commit is contained in:
Kristjan Komlosi
2019-11-01 20:48:54 +01:00
parent f5f9e53f48
commit a68c72f99b

View File

@@ -17,8 +17,8 @@ function updateData () {
function graphSpectralData (obj, dom) {
// graph spectral data in obj into dom
var graphPoints = [];
Object.keys(obj).forEach((element) => {
graphPoints.push([element, obj[element]]);
Object.keys(obj).forEach((element, index) => {
graphPoints.push([index, obj[element]]);
});
console.log(graphPoints);
}