mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-09-21 02:31:32 +02:00
Update morris.js
This commit is contained in:
parent
14530d0733
commit
62bd692d2b
10
morris.js
10
morris.js
@ -50,7 +50,8 @@ Licensed under the BSD-2-Clause License.
|
||||
})();
|
||||
|
||||
Morris.commas = function(num) {
|
||||
var absnum, intnum, ret, strabsnum;
|
||||
var ret='-';
|
||||
var absnum, intnum, strabsnum;
|
||||
if (num != null) {
|
||||
ret = num < 0 ? "-" : "";
|
||||
absnum = Math.abs(num);
|
||||
@ -59,11 +60,8 @@ Licensed under the BSD-2-Clause License.
|
||||
strabsnum = absnum.toString();
|
||||
if (strabsnum.length > intnum.length) {
|
||||
ret += strabsnum.slice(intnum.length);
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
|
||||
Morris.pad2 = function(number) {
|
||||
|
Loading…
Reference in New Issue
Block a user