Sparklines - see my post frequency
Posted by Chris @ 5:06 PM
The latest cool weby thing I've seen are sparklines. Developed by Edward Tufte they are a way of producing small graphs that can be easily inserted into text and web pages. I first saw it on the BBC Programme Catalogue (that graph thing on the right) and thought, that's cool.
After researching it a bit, it turns out there are a couple of websites that allow you to create sparklines with their web service (nothing more than a fancy image link). The most linked to one is on BitWorking and whilst perfectly usable, I wanted a .Net solution, so I followed the links to ewbi.develops. This is exactly what I was after, and the 2.3 version includes a scaling parameter which is mighty handy.
Anyway to cut what could be a rather long blog post short, I've downloaded the source, put it on my website (to avoid cross site calls where I can) and have implemented a sparkline on my archive page. It basically shows the number of posts per month for each month I've been posting. Nice and easy.
The only changes I've made are to the colour of the line to make it match my site. If you want to use my implementation of the sparkline generator then feel free, the url is http://cgriley.com/sparklines/sparkline.ashx. For documentation on the parameters to pass see the ewbi.develops site - I'll try and keep it up to date with that version so the documentation there should always apply to mine. Think of mine as merely a proxy version to avoid http requests to a strangers website!
In the not to far future I hope to write my own extended service on top of this one, which will graph the post frequency for any feed provided to it. Not sure what anyone will use if for, but it is always useful for these web services to exist in my opinion.
Now go, make some sparkline goodness in the world...