From: Richard Cyganiak <richard@cy...> - 2005-10-22 11:21:42
Thanks for this nice little library! It does a great job.
HOWEVER, I feel that you're putting unnecessary roadblocks into your
user's way. Getting sparkline to work was quite a frustrating
experience for me, for reasons that are altogether avoidable. That's
why I write this mail.
1. Please mention the GD requirement on the project's home page.
2. Where's the API documentation? The only form of documentation I
could find are the code examples in the download, and another example
hidden in the Wiki. I think I'm not the only developer who would like
to have a look at some docs BEFORE downloading, LINKED FROM THE HOME
3. sparkline does includes like this: require_once('Object.php');
I thought this was canonical: require_once(dirname(__FILE__) . '/
Simple, pain free. No need to let the user mess around with include
4. Somewhere deep in the code I found this:
$handle = @imagecreatetruecolor($x, $y);
When I run this on my test machine (which happened to have no GD),
then this fascinating line of code causes the script to die with a
fatal error, WITH THE ERROR MESSAGE SUPPRESSED. Which means
everything I try and all the samples just produce a blank response.
This is not helpful. That little @ bugger cost me an hour of my life.
5. Does a 1000 line library need its own custom logging system? Isn't
trigger_error and friends just fine for such a small project? I found
After that, everything was a breeze, the API is intuitive, everything
just worked and the results are just beautiful.
Ah, one more thing, which looks like a small bug:
When I create a Sparkline_Line from something this data:
0 0 1 1 1 0 0
Then it looks like this:
The uppermost line is missing; it's probably outside of the image.
This is with resampled rendering. I worked around this with SetMaxY.
Sorry for sounding so negative; I think sparkline is a phantastic and
well-designed library and I was impressed by how easy it was, from a
pure coding perspective, to get beautiful results.
P.S.: Here's what I use sparkline for:
If you've got an RSS reader or RSS capable browser: Here's a feed for
the sparkline SourceForge project: