NAME

GD::Sparkline

VERSION

$LastChangedRevision$

SYNOPSIS

  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();

DESCRIPTION

 Draw simple graphs using the magic of GD and Math::Bezier

SUBROUTINES/METHODS

fields - an array of available fields:

  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

new - object constructor

  my $oSpark = GD::Sparkline->new({
                                   <fieldname> => <value>
                                   ...
                                  });

draw - generate and return PNG image from the dataset

  my $sPNG = $oSpark->draw();

type_b - handling for bezier charts

  $oSparkline->type_b($gd, $arDataPoints,
                      { min  => $iMin, max => $iMax },
                      { h    => $iHeight, w => $iWidth
                        line => $oGDLineColour, area => $oGDAreaColour });

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

DEPENDENCIES

strict
warnings
GD
base
Class::Accessor
Readonly
Math::Bezier

INCOMPATIBILITIES

BUGS AND LIMITATIONS

AUTHOR

$Author: Roger Pettett$

LICENSE AND COPYRIGHT

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.