Personal tools
You are here: Home Range CGI SVG "sparkline" Graphs
Document Actions

by Perry Kundert last modified 2006-08-29 12:57

A python implementation of a "sparkline" graph generating web service. Any web page can specify a URL containing graph data, and obtain the corresponding graphic for display on the HTML page.

In March 2006, Sun Microsystems generously provided me with a new Sunfire T2000 server for testing.  Like many others, I wondered about the best way to present the test results data.  That is how I stumbled upon the idea of "sparkline" graphs.

After locating an interesting Python SVG generator implementation by Rick Muller, and another non-SVG Python sparkline graph CGI web service by Joe Gregario, I set about writing my own.  I wanted a Python-based CGI web service capable of serving up sparkline graphs in any image format (including SVG). 

The source code for (and related resource material) is in  You can access the web service (hosted presently on the above-mention Sunfire T2000!), via URLs like,2,9,0,-1,7,5,8&min=red&max=green&format=png:

Call with no options (just a ?) to get a listing of the available URL options:

Site by Sunflower Graphics
Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: