b r a y d e n . o r g / Random

/ WebHome / MonthlyDigest / DigestPage0712

This Web


WebHome  
Topic List  
Web Statistics 

All Webs


Books
Main
Random
Software
TWiki  

brayden.org


Home
Monthly Digest
Today's Links
Resumé
Reading List
Books RSS
Random RSS
Software RSS

Other


Joanne's Blog
Dale's Blog

Bloglines
currently-reading
Jetable email
TextDrive
Progressive Magazine
out campaign

Rendering sparklines on TWiki using google charts

Google recently made public their chart creation api. Very simple, very cool. The idea is that you specify chart data and settings in a url, and get back a generated image.

I wrote a little code that renders sparklines-like graphs using the google charts api, from TWiki. In my case I call the code from one of my plugins - but I'm probably the only person on the planet that uses that plugin, so you would need to call it from somewhere else.

The basic idea is simple: create the simplest, smallest legible line graph for a set of data. Small enough that it can serve as just another 'word' in a sentence, yet convey a relatively large set of quantitative information.

My approach was to invent some wiki syntax: ((sparkline)(number1, ..., numberk)), e.g. ((sparkline)(1500.0,700,1244,400,800.0,1921.5,2100.2,500,900,600,800,1000,1921.5,2100.2,500,900,600,800,1000)). This gets rendered as shown in this example. It's all fairly easy.

... more

 
 
Current Rev: r1.1 - 08 Dec 2007 - 23:16 GMT - DaleBrayden, Revision History:Diffs | r1.1
© 2003-2006 by the contributing authors.