GD::Sparkline
$LastChangedRevision$
my $oSpark = GD::Sparkline->new({ s => q[10,10,20,50,60,80,100,400,100,80,40,30,15,15,15], }); print $oSpark->draw();
Draw simple graphs using the magic of GD and Math::Bezier
my @aFields = GD::Sparkline->fields(); p - raw data in ASCII s - series data in comma-separated decimal h - height of image in pixels, default 20 w - width of image in pixels, default 80 b - background colour in 6-digit hex or 'transparent', default FFFFFF a - area colour in 6-digit hex l - line colour in 6-digit hex t = b - bezier All are also available as get/set accessors
my $oSpark = GD::Sparkline->new({ <fieldname> => <value> ... });
my $sPNG = $oSpark->draw();
$oSparkline->type_b($gd, $arDataPoints, { min => $iMin, max => $iMax }, { h => $iHeight, w => $iWidth line => $oGDLineColour, area => $oGDAreaColour });
$Author: Roger Pettett$
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.10 or, at your option, any later version of Perl 5 you may have available.
To install GD::Sparkline, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GD::Sparkline
CPAN shell
perl -MCPAN -e shell install GD::Sparkline
For more information on module installation, please visit the detailed CPAN module installation guide.