Popularity
3.6
Stable
Activity
3.2
Declining
424
12
12

Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Tags: Ascii     Command Line Utilities     Unicode     Line     Data     Spark     Graph     Plot     Sparklines     Sparkline     Sparkly    
Latest version: v5.0.0

sparkly alternatives and similar modules

Based on the "Command Line Utilities" category.
Alternatively, view sparkly alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of sparkly or a related project?

Add another 'Command Line Utilities' Module

README

sparkly Build Status

Generate sparklines ▁▂▃▅▂▇

JavaScript port of spark.sh.

Some cool use-cases.

Install

$ npm install sparkly

Usage

const sparkly = require('sparkly');

sparkly([0, 3, 5, 8, 4, 3, 4, 10]);
//=> '▁▃▄▇▄▃▄█'

// Specifying anything other than finite numbers will cause holes
sparkly([0, 3, 5, '', 4, 3, 4, 10]);
//=> '▁▃▄ ▄▃▄█'

// Specifying an object with minimum and maximum options will change the sparkline range
sparkly([1, 2, 3, 4, 5], {minimum: 0, maximum: 10});
//=> '▁▂▃▄▄'

// Specifying a style option will change the sparkline color
sparkly([1, 2, 3, 4, 5, 6, 7, 8], {style: 'fire'});
// ↓

API

sparkly(numbers, [options])

numbers

Type: number[]

Numbers to create the sparkline from.

options

Type: object

minimum

Type: number

Minimum range.

maximum

Type: number

Maximum range.

style

Type: string Values: 'fire'

Style for the sparklines.

Related

License

MIT © Sindre Sorhus


*Note that all licence references and agreements mentioned in the sparkly README section above are relevant to that project's source code only.