The Walden Effect: Farming, simple living, permaculture, and invention.

sparkline

The sparkline directive is supplied by the [[!iki plugins/sparkline desc=sparkline]] plugin.

This directive allows for embedding sparklines into wiki pages. A sparkline is a small word-size graphic chart, that is designed to be displayed alongside text.

examples

[[!sparkline  1 3 5 -3 10 0 width=40 height=16
featurepoint="4,-3,red,3" featurepoint="5,10,green,3"]]

This creates a simple line graph, graphing several points. It will be drawn 40 pixels wide and 16 pixels high. The high point in the line has a green marker, and the low point has a red marker.

[[!sparkline  1 -1(red) 1 -1(red) 1 1 1 -1(red) -1(red) style=bar barwidth=2
barspacing=1 height=13]]

This more complex example generates a bar graph. The bars are 2 pixels wide, and separated by one pixel, and the graph is 13 pixels tall. Width is determined automatically for bar graphs. The points with negative values are colored red, instead of the default black.

usage

The form for the data points is "x,y", or just "y" if the x values don't matter. Bar graphs can also add "(color)" to specify a color for that bar.

The following named parameters are recognised. Most of these are the same as those used by the underlying sparkline library, which is documented in more detail in its wiki.



Join the Walden Effect!

Download a free copy of Small-Scale No-Till Gardening Basics when you subscribe to our behind-the-scenes newsletter.

Anna Hess's books
Want more in-depth information? Browse through our books.

Or explore more posts by date or by subject.

About us: Anna Hess and Mark Hamilton spent over a decade living self-sufficiently in the mountains of Virginia before moving north to start over from scratch in the foothills of Ohio. They've experimented with permaculture, no-till gardening, trailersteading, home-based microbusinesses and much more, writing about their adventures in both blogs and books.



Want to be notified when new comments are posted on this page? Click on the RSS button after you add a comment to subscribe to the comment feed, or simply check the box beside "email replies to me" while writing your comment.






profile counter myspace



Powered by Branchable Wiki Hosting.

Required disclosures:

As an Amazon Associate, I earn a few pennies every time you buy something using one of my affiliate links. Don't worry, though --- I only recommend products I thoroughly stand behind!

Also, this site has Google ads on it. Third party vendors, including Google, use cookies to serve ads based on a user's prior visits to a website. Google's use of advertising cookies enables it and its partners to serve ads to users based on their visit to various sites. You can opt out of personalized advertising by visiting this site.