Sparklet is a spark-line/graph pagelet for the BigPipe framework. It's highly customizable by simply extending and remixing the pagelet.
sparklet module is released in the public npm registry and can be added to
your package using:
npm install --save sparklet
'use strict';var Sparklet = ;
By default, the
sparklet has no data to show. You need to extend the
instance and a
fetch method which receives one argument which is a callback
var mysparklet = Sparklet
The data that you pass in the
next function should be an array of objects.
These objects should have a
value key. By default we assume that
you provide the date in a
YYYY-MM-DD format. If your using a different format
either change it using a
.map operation on your array or change the
property on the pagelet:
Anything that D3's time/date formatter accepts can be used here.