jQuery Sparklines 
A reactive blaze component for rendering live jQuery Sparklines.
jQuery Sparklines Official Documentation
Live Example
Usage
There are four data sources that you can draw from.
- CSV Datasource :
{{> sparkline csv="1,2,3,4" }}
- Array Datasource :
{{> sparkline array=someArray }}
- DOM Datasource :
{{#sparkline domSource="true" }} {{ someCSVData }} {{/sparkline}}
- Cursor Datasource :
{{> sparkline cursor=someCursor property="value" }}
By default sparkline will create a line graph with a selector of sparkline-{guid}
If you need the selector for something else you can set it via the selector
option.
{{> sparkline selector="my-sparkline" array=someArrayData }}
You can specify any of the types allowed by the jquery-sparklines plugin
- Line :
{{> sparkline type="line" array=someArray }}
- Bar :
{{> sparkline type="bar" array=someArray }}
- Tristate :
{{> sparkline type="tristate" array=someArray }}
- Discrete :
{{> sparkline type="discrete" array=someArray }}
- Bullet :
{{> sparkline type="bullet" array=someArray }}
- Pie :
{{> sparkline type="pie" array=someArray }}
- Box Plots :
{{> sparkline type="box" array=someArray }}
You can also specify preset styles or pass in your own css classes
1{{> sparkline 2 styles="bar-success" 3 csv=sparklines.csvDataSeriesExample 4}}
Same goes for the sparklines configuration options
1{{> sparkline 2 csv=sparklines.csvDataSeriesExample 3 options=options 4}}
The official jquery-sparklines docs has a pretty comprehensive list of options and great documentation .
Installing sparklines using Meteorite
$ mrt add jquery-sparklines
To run example locally
$ git clone git://github.com/lumapictures/meteor-jquery-sparklines.git $ cd meteor-jquery-sparklines/example $ mrt $ meteor
Tests
$ cd meteor-jquery-sparklines/example $ mrt test-packages jquery-sparklines