Image::BoxModel::Chart - Charts using Image::BoxModel (Incomplete)
use Image::BoxModel::Chart; my $image = new Image::BoxModel::Chart ( width => 800, height => 400, lib=> "GD", #your backend ); #all parameters are optional! $image -> Chart (dataset_01 => [1,5,3,10,-10]); $image -> Save(file=> "chart.png");
Image::BoxModel::Chart will implement different sorts of charts.
bars, points, stapled points, lines
Draw chart. Documentation is incomplete because the interface is due to frequent changes.
$image -> Legend( #mandatory: font => (path to font file), name => (name of box in which the legend lives) values_annotations => (name of your datasets) #optional (dafaults preset): textsize => [number], rotate => [number], colors => (color names of datasets), #nice: 'colors => DefaultColors()' sets default colors position => ['right'|'left], orientation => 'vertical', #horizontal is unimplemented so far resize => (name of box to be resized), background => (color), padding_left => [number], padding_right => [number], padding_top => [number], padding_bottom => [number], spacing_left => [number], spacing_top => [number], spacing_right => [number], spacing_bottom => [number], border => [number], border_color => (color), );
Draw Legend.
To install Image::BoxModel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Image::BoxModel
CPAN shell
perl -MCPAN -e shell install Image::BoxModel
For more information on module installation, please visit the detailed CPAN module installation guide.