Chart::OFC::Dataset::Bar - A dataset represented as bars
version 0.12
my @numbers = (1, 2, 3); my $bars = Chart::OFC::Dataset::Bar->new( values => \@numbers, opacity => 60, fill_color => 'purple', label => 'Daily Sales in $', text_size => 12, );
This class contains values to be charted as bars on a grid chart. The bars are filled with the specified color, but have no outline or other styling.
This class has several attributes which may be passed to the new() method.
new()
It is a subclass of Chart::OFC::Dataset and accepts all of that class's attributes as well as its own.
Chart::OFC::Dataset
This defines how opaque the bars are. When they are moused over, they become fully opaque.
Defaults to 80 (percent).
The color used to fill the bars.
Defaults to #999999 (medium grey).
If provided, this will be shown as part of the chart key. The label will be the same color as the fill_color for the bars.
This attribute is optional.
This is the size of the text in the key.
Defaults to 10 (pixels).
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.