mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-13 07:11:12 +01:00
Make hover a *teensy* bit clearer.
This commit is contained in:
parent
e76f6c8e0a
commit
16b88ba1de
4 changed files with 7 additions and 4 deletions
|
@ -24,7 +24,7 @@ class Morris.EventEmitter
|
|||
# Morris.commas(1234567) -> '1,234,567'
|
||||
Morris.commas = (num) ->
|
||||
if num is null
|
||||
"n/a"
|
||||
"-"
|
||||
else
|
||||
ret = if num < 0 then "-" else ""
|
||||
absnum = Math.abs(num)
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
Morris.commas = function(num) {
|
||||
var absnum, intnum, ret, strabsnum;
|
||||
if (num === null) {
|
||||
return "n/a";
|
||||
return "-";
|
||||
} else {
|
||||
ret = num < 0 ? "-" : "";
|
||||
absnum = Math.abs(num);
|
||||
|
|
2
morris.min.js
vendored
2
morris.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -32,4 +32,7 @@ describe '#commas', ->
|
|||
Morris.commas(-1.2).should.equal("-1.2")
|
||||
Morris.commas(-12.34).should.equal("-12.34")
|
||||
Morris.commas(-123.456).should.equal("-123.456")
|
||||
Morris.commas(-1234.56).should.equal("-1,234.56")
|
||||
Morris.commas(-1234.56).should.equal("-1,234.56")
|
||||
|
||||
# null
|
||||
Morris.commas(null).should.equal('-')
|
||||
|
|
Loading…
Reference in a new issue