mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Make hover a *teensy* bit clearer.
This commit is contained in:
parent
e76f6c8e0a
commit
16b88ba1de
@ -24,7 +24,7 @@ class Morris.EventEmitter
|
|||||||
# Morris.commas(1234567) -> '1,234,567'
|
# Morris.commas(1234567) -> '1,234,567'
|
||||||
Morris.commas = (num) ->
|
Morris.commas = (num) ->
|
||||||
if num is null
|
if num is null
|
||||||
"n/a"
|
"-"
|
||||||
else
|
else
|
||||||
ret = if num < 0 then "-" else ""
|
ret = if num < 0 then "-" else ""
|
||||||
absnum = Math.abs(num)
|
absnum = Math.abs(num)
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
Morris.commas = function(num) {
|
Morris.commas = function(num) {
|
||||||
var absnum, intnum, ret, strabsnum;
|
var absnum, intnum, ret, strabsnum;
|
||||||
if (num === null) {
|
if (num === null) {
|
||||||
return "n/a";
|
return "-";
|
||||||
} else {
|
} else {
|
||||||
ret = num < 0 ? "-" : "";
|
ret = num < 0 ? "-" : "";
|
||||||
absnum = Math.abs(num);
|
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
@ -33,3 +33,6 @@ describe '#commas', ->
|
|||||||
Morris.commas(-12.34).should.equal("-12.34")
|
Morris.commas(-12.34).should.equal("-12.34")
|
||||||
Morris.commas(-123.456).should.equal("-123.456")
|
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 New Issue
Block a user