mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-13 07:11:12 +01:00
Update morris.js
This commit is contained in:
parent
14530d0733
commit
62bd692d2b
1 changed files with 4 additions and 6 deletions
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 a new issue