Sparklines for WordPress
Sparklines is a WordPress Plugin to enable inline charts powered by the Spark font by After the Flood.
Download the ZIP using the green button on this page and go to Plugins > Add New > Upload Plugin in your WordPress admin panel. Upload the ZIP file and you're good to go!
The plugin will soon be available in the official plugin repository. Hopefully. :)
Using the shortcode
The plugin provides you with a
[spark] shortcode that takes some input and
generates the appropriate HTML and enqueues the stylesheet.
The basic shortcode format is (with default vaules):
[spark start="123" data="10,20,30,40,50,60,70,80,90,100" end="789" type="bar-medium"]
||123||The starting point. Will be displayed before the chart.|
Data points to be rendered inside the graph. Anything that isn't a number will be filtered out (strings, spaces etc.).
||789||The ending point. Will be displayed after the chart.|
||bar-medium||Type of chart to be used. See available fonts below.|
Types of charts
The sparkline charts can be displayed in any of the following types:
- Medium Bar (
- Narrow Bar (
- Thin Bar (
- Medium Dot (
- Small Dot (
- Medium Line (
Only supports values 0-9.
The font is maintained by After the flood. Read more about AtF Spark here.