File: demos/startbootstrap-sb-admin-2/bower_components/morrisjs/spec/lib/grid/y_label_format_spec.coffee

Recommend this page to a friend!
  Classes of Emmanuel Podvin   Blapy   demos/startbootstrap-sb-admin-2/bower_components/morrisjs/spec/lib/grid/y_label_format_spec.coffee   Download  
File: demos/startbootstrap-sb-admin-2/bower_components/morrisjs/spec/lib/grid/y_label_format_spec.coffee
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Blapy
jQuery plugin to load linked pages using AJAX
Author: By
Last change: Update of demos/startbootstrap-sb-admin-2/bower_components/morrisjs/spec/lib/grid/y_label_format_spec.coffee
Date: 2 years ago
Size: 443 bytes
 

Contents

Class file image Download
describe 'Morris.Grid#yLabelFormat', -> it 'should use custom formatter for y labels', -> formatter = (label) -> flabel = parseFloat(label) / 1000 "#{flabel.toFixed(1)}k" line = Morris.Line element: 'graph' data: [{x: 1, y: 1500}, {x: 2, y: 2500}] xkey: 'x' ykeys: ['y'] labels: ['dontcare'] preUnits: "$" yLabelFormat: formatter line.yLabelFormat(1500).should.equal "1.5k"