GD::Graph::Thermometer

GD::Graph::Thermometer is a Perl module to generate progress graph on the fly.
Download

GD::Graph::Thermometer Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Hugh Esco
  • Publisher web site:
  • http://search.cpan.org/~hesco/Business-CCProcessor-0.09/lib/Business/CCProcessor.pm

GD::Graph::Thermometer Tags


GD::Graph::Thermometer Description

GD::Graph::Thermometer is a Perl module to generate progress graph on the fly. GD::Graph::Thermometer is a Perl module to generate progress graph on the fly.SYNOPSIS use GD::Graph::Thermometer; my $result = GD::Graph::Thermometer->new({ image_path => '/path/to/image.png', type => 'png', goal => '80000', current => '20000', title => 'Funding the League for the Year ($)', width => '100', height => '200', transparent => '1', background_color => , text_color => , outline_color => , mercury_color => });When deployed in production, the current value ought to be dynamically calculated based on a query of the database tracking contributions or volunteers or whatever the goal represented by the graph represents.my $result = GD::Graph::Thermometer->new({});This module exports only one method, its constructor, ->new(), which creates a .png (by default) image file of the thermometer graph with the path and name defined in its constructor. If no image_path is defined in the constructor, then the module will print the image directly to STDOUT.The anonymous hash fed to the constructor must define values for the keys: goal and current. Otherwise a fatal error will be thrown. Current should represent the progress made toward the goal being graphed since the beginning of the campaign.The output format defaults to png if the key 'type' is undefined, otherwise a user may specify png, gif or jpeg as the output format. These correspond to the GD::Image-> methods by the same name, which are used to implement the ->_render_image() internal method.The size parameters will default to 100 pixels wide by 200 pixels tall, if those arguments are missing from the anonymous hash given to the constructor. If title is not defined a warning will be thrown, but the graph will still be generated.The colors for the background, text, outline and mercury will default to white, black, black and red respectively, if not otherwise defined in the constructor. If defined in the constructor, they should be defined as an anonymous array of three values ( => ,), range 0 - 255, suitable for feeding to the GD::Image->colorAllocate() method. If the transparent key is set to '1', any area of the image set to either the default or a custom background color will render as transparent for inclusion on a web page. Requirements: · Perl · GD · GD::Text::Align


GD::Graph::Thermometer Related Software