@domoinc/multiline-chart
Version:
MultiLineChart - Domo Widget
31 lines (25 loc) • 711 B
Markdown
This module crates a service that can convert numbers to abbeviated summary numbers.
- `$ npm start` to run webpack-dev-server
- `$ npm test` to run unit tests
- `$ npm tdd` to continuously run tests
- `$ npm run jshint` to lint code
- `$ npm run build` to build (and minify)
- `$ npm version (patch|minor|major)` to create git release
## Library Example
```js
// init with language config
var service = new SummaryNumber(/* optional language config */);
// usage
var summaryNumber = service.summaryNumber(1234); // 1.23K
```
```js
var defaultConfig = {
decimal: '.',
thousands: ',',
summary: ['', 'K', 'M', 'B', 'T', 'Q'],
grouping: 3
};
```