Chart::OFC2::Axis - OFC2 axis base module
use Chart::OFC2::Axis; my $x_axis = Chart::OFC2::XAxis->new( labels => { labels => [ 'Jan', 'Feb', 'Mar', 'Apr', 'May' ] } );
X or Y axis for OFC2.
has 'name' => ( is => 'rw', isa => enum(['x_axis', 'y_axis', 'y_axis_right']), required => 1 ); has 'labels' => ( is => 'rw', isa => ChartOFC2Labels, coerce => 1); has 'stroke' => ( is => 'rw', isa => 'Int', ); has 'colour' => ( is => 'rw', isa => 'Str', alias => 'color' ); has 'offset' => ( is => 'rw', isa => 'Bool', ); has 'grid_colour' => ( is => 'rw', isa => 'Str', alias => 'grid_color'); has 'is3d' => ( is => 'rw', isa => 'Bool', ); has 'steps' => ( is => 'rw', isa => PositiveInt, ); has 'visible' => ( is => 'rw', isa => 'Bool', ); has 'min' => ( is => 'rw', isa => 'Num|Str|Undef', ); # can be 'a' for auto too has 'max' => ( is => 'rw', isa => 'Num|Str|Undef', ); # can be 'a' for auto too
Returns HashRef that is possible to give to encode_json() function.
encode_json()
Same as colour().
Same as grid_colour().
X axis object.
extends 'Chart::OFC2::Axis';
has '+name' => ( default => 'x_axis', ); has 'tick_height' => ( is => 'rw', isa => 'Int', );
y axis object.
has '+name' => ( default => 'y_axis' ); has 'tick_length' => ( is => 'rw', isa => 'Int', );
y axis on the right side object.
extends 'Chart::OFC2::YAxis';
has '+name' => ( default => 'y_axis_right' );
Jozef Kutej
To install Chart::OFC2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chart::OFC2
CPAN shell
perl -MCPAN -e shell install Chart::OFC2
For more information on module installation, please visit the detailed CPAN module installation guide.