chart fix
This commit is contained in:
parent
8953f3d643
commit
b40eed2acc
|
@ -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]]
|
||||
}
|
||||
})
|
||||
}]
|
||||
|
|
Loading…
Reference in New Issue