forked from 0x2620/oxjs
use base 10 in parseInt, use Math.floor for numbers
This commit is contained in:
parent
79bb322112
commit
8bc8c57373
19 changed files with 44 additions and 45 deletions
4
source/Ox.UI/js/List/Chart.js
vendored
4
source/Ox.UI/js/List/Chart.js
vendored
|
|
@ -74,7 +74,7 @@ Ox.Chart = function(options, self) {
|
|||
});
|
||||
}
|
||||
self.sort[key] = key.replace(/(\d+)/g, function(number) {
|
||||
return Ox.pad(parseInt(number), 16);
|
||||
return Ox.pad(parseInt(number, 10), 16);
|
||||
});
|
||||
});
|
||||
self.max = Ox.max(self.totals);
|
||||
|
|
@ -83,7 +83,7 @@ Ox.Chart = function(options, self) {
|
|||
if (self.subData) {
|
||||
Ox.forEach(self.subData, function(subValue, subKey) {
|
||||
self.sort[subKey] = subKey.replace(/(\d+)/g, function(number) {
|
||||
return Ox.pad(parseInt(number), 16);
|
||||
return Ox.pad(parseInt(number, 10), 16);
|
||||
});
|
||||
});
|
||||
self.subKeys = Object.keys(self.subData).sort(function(a, b) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue