On-the-fly Sparklines with JavaScript and XBM

This is an alternative implementation of Jesse Andrews' client-side generation of Sparklines. It also is the direct result of his comment about creating a version to use bitmaps instead of the (still) widely unsupported SVG format he used.
The 5 Sparklines below don't require any plugin and are all bitmaps created with 2 small JavaScript classes:
  1. xbminimal.js
    This is a cutdown and optimized version of the xbmDraw library by David L. Blackledge to dynamically create XBM images. My version only supports single pixel access and line drawing. It is also slightly faster, so the imapct of creating many sparklines is reduced when a page using them is loaded. Please see the source code for license and usage guidelines.
  2. sparklineXBM.js
    This class is the adapted version of the above mentioned Sparklines script, here making use of the XBMImage class. Look and behaviour of the graph can be configured. Again, license and usage examples are included in the source.
Note: All Sparklines below are based on random data, please reload page to see them change.
© 2005 Karsten Schmidt | toxi.co.uk
sparkline #1...
sparkline #2...
sparkline #3...
sparkline #4...
sparkline #5...