GD-3DBarGrapher

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

3DBarGrapher was written primarily to create "professional looking" 3D bar
graphs.

It features:

  - customisable colours, fonts and dimensions 
  - bar or column styles 
  - gradient fill option for columns and plot area background 
  - random bar colour feature to easily make multiple graphs on the same
    page more distinct 
  - XHTML image map output to enable displaying of values when moving mouse
    cursor over the bars
    
Example usage:

  use GD::3DBarGrapher qw(creategraph);
        
  my @data = (
      ['Apples', 28],
      ['Pears',  43],
      ...etc 

lib/GD/3DBarGrapher.pm  view on Meta::CPAN


  my %options = (
      'file' => '/webroot/images/mygraph.jpg',
  );

  my $imagemap = creategraph(\@data, \%options);

=head1 DESCRIPTION

There is only one function in the 3dBarGrapher module and that is creategraph
which will return image map XHTML for use in a web page displaying the graph.

The data to graph must be passed in a multidimensional array where column 0
is the x-axis name of the item to graph and column 1 is it's associated
numerical value.

Graph options are passed in a hash and override the defaults listed below. At
minimum the 'file' option must be included and specify the full path and
filename of the graph to create.

=head1 Options

lib/GD/3DBarGrapher.pm  view on Meta::CPAN

=item 3.
For better text quality it is recommended to specify true type fonts for
options tfont, lfont & vfont. the full path and font file name must be
included, eg: 'c:/windows/fonts/verdana.ttf'

=item 4.
Only options that default to empty can be defined as empty

=head1 Image Map

The creategraph function returns XHTML code for the image and an associated
image map, something like this:

  <img src="mygraph.jpg" width="400" height="320" border="0" usemap="#mygraphjpg1179003059" />
  <map name="mygraphjpg1179003059" id="mygraphjpg1179003059">
  <area shape="rect" coords="67,123,112,245" href="#" title="Apples: 28" />
  <area shape="rect" coords="112,75,158,245" href="#" title="Pears: 43" />
  ...etc
  </map>

=head1 Bugs



( run in 1.268 second using v1.01-cache-2.11-cpan-49f99fa48dc )