When I read this, I felt a little blood vessel pop in the back of my mind. A little while later, I had a set of Javascript functions to write these graphics in SVG ( I wrote it at the office, so it might seem a little disjointed ).

You'll need a browser with proper SVG/SVG DOM to get away with this. I don't know if Adobe's plugin does, but I can confirm it works with the Firefox nightly builds ( Deer Park Alpha 1 - Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050607 Firefox/1.0+ ).

sparklines.js - please copy it to your own hosting if you want to use it.

Usage is something like this - var newImageB = dataToBinarySVG( ([ 0,1,0,1,1,1,1,1,4,4,0,1,0,0,0,0,1,0,1,0,1,0 ]), emSize );, etc. This gives you a DOM SVG object you can then, say, appendToChild() on a container object. I originally wanted to use this in a Greasemonkey script to dynamically insert Sparklines into other sites, but sadly Greasemonkey doesn't work in the latest Firefox nightly builds.

I confess I read Tufte's comments on scaling of the vertical axis to maximise pattern detection, but I haven't implemented this. Yet.

Cheerio!