Chart::Strip - Draw strip chart type graphs.
use Chart::Strip; my $ch = Chart::Strip->new( title => 'Happiness of our Group', # other options ... ); $ch->add_data( $davey_data, { style => 'line', color => 'FF0000', label => 'Davey' } ); $ch->add_data( $jenna_data, { style => 'line', color => '00FF88', label => 'Jenna' } ); print $ch->png();
The Chart::Strip package plots data values versus time graphs, such as used for seismographs, EKGs, or network usage reports.
It can plot multiple data sets on one graph. It offers several styles of plots. It automatically determines the proper ranges and labels for both axii.
$chart = Chart::Strip->new(); $chart = Chart::Strip->new( option1 => value, option2 => value, );
If no options are specified, sensible default values will be used. The following options are recognized:
width
The width of the image
height
The height of the image.
title
The title of the graph. Will be placed centered at the top.
x_label
The label for the x axis. Will be placed centered at the bottom.
y_label
The label for the y axis. Will be placed vertically along the left side.
draw_grid
Should a grid be drawn on the graph?
draw_border
Should a border be drawn around the edge of the image?
draw_tic_labels
Should value labels be shown?
draw_data_labels
Should each data set be labeled?
transparent
Should the background be transparent?
grid_on_top
Should the grid be drawn over the data (1) or below the data (0)?
binary
Use powers of 2 instead of powers of 10 for the y axis labels.
$chart->add_data( $data, $options );
The data should be an array ref of data points. Each data point should be a hash ref containing:
{ time => $time_t, # must be a unix time_t value => $value, # the data value color => $color, # optional, used for this one point }
or, range style graphs should contain:
{ time => $time_t, # must be a unix time_t min => $low, # the minimum data value max => $high, # the maximum data value color => $color, # optional, used for this one point }
and the options may contain:
{ style => 'line', # graph style: line, filled, range, points color => 'FF00FF', # color used for the graph label => 'New England', # name of the data set }
Will return the PNG image
Will return the jpeg image
Will return the underlying GD object.
http://argus.tcp4me.com/shots.html http://search.cpan.org/src/JAW/Chart-Strip-1.01/eg/
There are no known bugs in the module.
Yellowstone National Park.
Jeff Weisberg - http://www.tcp4me.com
To install Chart::Strip, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chart::Strip
CPAN shell
perl -MCPAN -e shell install Chart::Strip
For more information on module installation, please visit the detailed CPAN module installation guide.