minor changes in Ox.Chart
This commit is contained in:
parent
4a210718ea
commit
b4fd0f01ae
1 changed files with 4 additions and 2 deletions
|
@ -58,6 +58,8 @@ Ox.Chart = function(options, self) {
|
||||||
self.subData = {};
|
self.subData = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fixme: a lot of the sorting is unneeded, since it happens in the list
|
||||||
|
|
||||||
self.sort = {};
|
self.sort = {};
|
||||||
self.totals = {};
|
self.totals = {};
|
||||||
Ox.forEach(self.options.data, function(value, key) {
|
Ox.forEach(self.options.data, function(value, key) {
|
||||||
|
@ -83,8 +85,8 @@ Ox.Chart = function(options, self) {
|
||||||
self.subKeys = Object.keys(self.subData).sort(function(a, b) {
|
self.subKeys = Object.keys(self.subData).sort(function(a, b) {
|
||||||
var aValue = self.subData[a],
|
var aValue = self.subData[a],
|
||||||
bValue = self.subData[b];
|
bValue = self.subData[b];
|
||||||
return a == '' ? 1
|
return a === '' ? 1
|
||||||
: b == '' ? -1
|
: b === '' ? -1
|
||||||
//: aValue < bValue ? 1
|
//: aValue < bValue ? 1
|
||||||
//: aValue > bValue ? -1
|
//: aValue > bValue ? -1
|
||||||
: self.sort[a] < self.sort[b] ? -1
|
: self.sort[a] < self.sort[b] ? -1
|
||||||
|
|
Loading…
Reference in a new issue