Chart::OFC::Grid - A grid chart
version 0.12
my $bars = Chart::OFC::Dataset::Bar->new( values => [ 1 .. 5 ] ); my $line = Chart::OFC::Dataset::Line->new( values => [ 2 .. 7 ] ); my $x_axis = Chart::OFC::XAxis->new( axis_label => 'X Axis' ); my $y_axis = Chart::OFC::YAxis->new( axis_label => 'Y Axis', max => 10, label_steps => 2 ); my $grid = Chart::OFC::Grid->new( title => 'My Grid Chart', datasets => [ $bars, $line ], x_axis => $x_axis, y_axis => $y_axis, );
This class represents a grid chart. A grid chart can contain any combination of bars, lines, and area lines.
It also has an X and a Y axis.
This class is a subclass of Chart::OFC and accepts all of that class's attribute. It has several attributes of its own which may be passed to the new() method.
Chart::OFC
new()
This should be an array reference containing at least one dataset. The datasets can be of any type except Class::OFC::Dataset (the base class). Instead, they must be objects of some Dataset subclass.
Class::OFC::Dataset
This attribute is required.
This should be a Chart::OFC::XAxis object.
Chart::OFC::XAxis
This should be a Chart::OFC::YAxis object.
Chart::OFC::YAxis
The background color for just the chart itself, as opposed to the surrounding text.
This attribute is optional.
If this is provided, then OFC will implement a fade between the two inner background colors. If you provide this you must also provide an inner_bg_fade_angle attribute.
inner_bg_fade_angle
A number from 0 to 359 specifying the angle of the fade between the two background colors. If you provide this you must also provide two inner background colors.
This class does the Chart::OFC::Role::OFCDataLines role.
Chart::OFC::Role::OFCDataLines
Dave Rolsky <autarch@urth.org>
This software is Copyright (c) 2014 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Chart::OFC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chart::OFC
CPAN shell
perl -MCPAN -e shell install Chart::OFC
For more information on module installation, please visit the detailed CPAN module installation guide.