| Chart-OFC documentation | Contained in the Chart-OFC distribution. |
my $bars = Chart::OFC::Dataset::OutlinedBar->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 and have a separate outline color. They are styled to give a "glass" look.
This class is a subclass of Chart::OFC::Dataset::Bar and accepts
all of that class's attributes. It has one attribute of its own.
This is the color used to outline the bar.
Defaults to #000000 (black).
This class does the Chart::OFC::Role::OFCDataLines role.
| Chart-OFC documentation | Contained in the Chart-OFC distribution. |
package Chart::OFC::Dataset::OutlinedBar; BEGIN { $Chart::OFC::Dataset::OutlinedBar::VERSION = '0.10'; } use strict; use warnings; use Moose; use MooseX::StrictConstructor; use Chart::OFC::Types; extends 'Chart::OFC::Dataset::Bar'; has outline_color => ( is => 'ro', isa => 'Chart::OFC::Type::Color', coerce => 1, default => '#000000', ); sub type { return 'filled_bar'; } sub _parameters_for_type { my $self = shift; my @p = ( $self->opacity(), $self->fill_color(), $self->outline_color() ); push @p, ( $self->label(), $self->text_size() ) if $self->_has_label(); return @p; } no Moose; __PACKAGE__->meta()->make_immutable(); 1;