GD::Graph::Data

GD::Graph::Data is a Perl module that contains data set encapsulation for GD::Graph.
Download

GD::Graph::Data Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Martien Verbruggen
  • Publisher web site:
  • http://search.cpan.org/~bwarfield/GDGraph-1.44/Graph/Data.pm

GD::Graph::Data Tags


GD::Graph::Data Description

GD::Graph::Data is a Perl module that contains data set encapsulation for GD::Graph. GD::Graph::Data is a Perl module that contains data set encapsulation for GD::Graph.This module encapsulates the data structure that is needed for GD::Graph and friends. An object of this class contains a list of X values, and a number of lists of corresponding Y values. This only really makes sense if the Y values are numerical, but you can basically store anything. Undefined values have a special meaning to GD::Graph, so they are treated with care when stored.Many of the methods of this module are intended for internal use by GD::Graph and the module itself, and will most likely not be useful to you. Many won't even seem useful to you...EXAMPLES use GD::Graph::Data; use GD::Graph::bars; my $data = GD::Graph::Data->new(); $data->read(file => '/data/sales.dat', delimiter => ','); $data = $data->copy(wanted => ); # Add the newer figures from the database use DBI; # do DBI things, like connecting to the database, statement # preparation and execution while (@row = $sth->fetchrow_array) { $data->add_point(@row); } my $chart = GD::Graph::bars->new(); my $gd = $chart->plot($data);or for quick changes to legacy code # Legacy code builds array like this @data = ( , , , ); # And we quickly need to do some manipulations on that my $data = GD::Graph::Data->new(); $data->copy_from(@data); # And now do all the new stuff that's wanted. while (@foo = bar_baz()) { $data->add_point(@foo); } Requirements: · Perl


GD::Graph::Data Related Software