Blame | Last modification | View Log | Download | RSS feed
describe 'Morris.Grid#yLabelFormat', ->it 'should use custom formatter for y labels', ->formatter = (label) ->flabel = parseFloat(label) / 1000"#{flabel.toFixed(1)}k"line = Morris.Lineelement: 'graph'data: [{x: 1, y: 1500}, {x: 2, y: 2500}]xkey: 'x'ykeys: ['y']labels: ['dontcare']preUnits: "$"yLabelFormat: formatterline.yLabelFormat(1500).should.equal "1.5k"