diff --git a/static/charts.html b/static/charts.html
index c959452..737a81c 100644
--- a/static/charts.html
+++ b/static/charts.html
@@ -100,10 +100,9 @@
categories.add(parseInt(frame))
})
})
- categories = Array.from(categories).sort()
- json.xAxis = {
- categories: categories
- }
+ categories = Array.from(categories).sort(function (a,b) {
+ return a > b ? 1 : (a === b ? 0 : -1)
+ })
json.series = $.map(positions, function (position) {
if (!result[rank].hasOwnProperty(position)) {
return null;
@@ -118,9 +117,9 @@
},
data: $.map(categories, function (frame) {
if (result[rank][position].hasOwnProperty(frame)) {
- return [[parseInt(frame), (parseFloat(result[rank][position][frame].wp) * 100)]]
+ return [[frame, (parseFloat(result[rank][position][frame].wp) * 100)]]
} else {
- return [[parseInt(frame), null]]
+ return [[frame, null]]
}
})
}, {
@@ -134,9 +133,9 @@
},
data: $.map(categories, function (frame) {
if (result[rank][position].hasOwnProperty(frame)) {
- return [[parseInt(frame), parseFloat(result[rank][position][frame].adp)]]
+ return [[frame, parseFloat(result[rank][position][frame].adp)]]
} else {
- return [[parseInt(frame), null]]
+ return [[frame, null]]
}
})
}]