Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 520 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 520 Bytes

frmttr

Simple and dirty number formatter based on d3.format

Mainly useful to get two alternative notations from a number, e.g. for a bar chart.

1234567 -> {  short: "1.2k", // the bar display value
              alt: "1,234,567" // the alternative value that pops on hover
            }

Using https://github.com/mbostock/d3/wiki/Formatting

Initiated at qunb