The Sparkline Generator

Joe Gregorio

My latest article, A Bright, Shiny Service: Sparklines, is now available on XML.com. It's about the BitWorking Sparkline Generator, which is a web service, a web application, and source code, all for generating sparklines.

Tags:

Update: First public sighting of the sparklines service being used: Where Left Is Right.

Update 2: First port of the web service, this one being to .NET, by Eric Bachtal.

Man, this just kills me! Swear to god, I've been playing with the same thing -- I wanted a Sparkline generator myself, and I realized how easy it would be to make it a web service (and how great it would be to help popularize Sparklines). I started goofing around with the PHP code a month ago.

I fully admit I'm a mediocre coder, though (barely past hobbyist), and I wouldn't have come up with anything a fraction as polished. Very, very cool, there. I really had wondered whether someone else -- maybe someone with the chops to make this a weekend project -- would get there first. Kudos and a bow.

Posted by Dan Hartung on 2005-06-25

From the code, I can't tell why we are limited to an upper bound of 100, or why we can't use floating-point numbers. Could you please expand on that?

Posted by anonymous on 2005-06-25

Dan: You have no idea how much I was sweating the fact that someone might beat me to the punch before my XML.com article was published :)

didier:  No particular reason, it seemed the simplest thing that could possibly work. Patches are always welcome!

Posted by Joe on 2005-06-25

Excellent article. If you get a chance, though, you might want to correct the block comment on plot_sparkline() to agree with the implementation.

Posted by Dave Smith on 2005-06-26

comments powered by Disqus