Most steps are already explained elsewhere and the OVERVIEW just links there. The missing bits are layed
out here.
useChart
As with any other Modul you have to:
use Chart::[Type];
Type being a placeholder for a name of a chart type, which are: Bars, Composite, Direction, ErrorBars,
HorizontalBars, Lines, LinesPoints, Mountain, Pareto, Pie, Points, Split, StackedBars. To know more about
them read Chart::Manual::Types.
Alternatively write to load all chart types at ones with
use Chart;
Both are not importing any symbols in your name space but load Carp and GD.
dropdata
All the methods listed in the last section, that create the final image, take as an optional, second
argument data. This data may be delivered either as a reference to an array of arrays:
my $data = [ [ 1, 4, 3 ... ], # data set 0
[ 5, 8, 2 ... ], # data set 1
...
];
$graph->png( 'file.png', $data );
or in form of a file. Then the argument has to be a file name or a file handle (old school as in "FILE"
or modern as in $FH). Alternatively use the method add_datafile.
datafiles
Are arbitrary named text files containing one or several rows of numbers, which have to be separated by
spaces or tabs (\t) (mixing allowed). Perl style comments or empty lines will be ignored, but rows
containing different amount of numbers will cause problems.
createimage
Currently we support only images in the PNG and JPEG format. The methods to create them are named
straight forwardly: ->png and ->jpeg. Both take the same arguments and produce image files. For shell
scripting or web programming you need the image binary, which you get with: ->cgi_png or ->cgi_jpeg. Some
users might even want the GD object for further processing by your perl programm. In that case please
use: ->scalar_png or ->scalar_jpeg.
After having created a chart for web purposes, you also might want to utilize imagemap_dump.