| Chart-OFC documentation | Contained in the Chart-OFC distribution. |
Chart::OFC::AxisLabel - A label for an axis
version 0.10
my $label = Chart::OFC::AxisLabel->new( label => 'Some Text',
text_color => 'blue',
text_size => 15,
);
This class represents a label for a whole axis, as opposed to the labels for the ticks on that axis.
This class has a number of attributes which may be passed to the
new() method.
The text for the label.
This attribute is required.
The default color of tick labels.
Defaults to "#000000" (black).
The size of tick labels for the axis, in pixels.
Defaults to 20.
This class does the Chart::OFC::Role::OFCDataLines role.
Dave Rolsky <autarch@urth.org>
This software is Copyright (c) 2011 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
| Chart-OFC documentation | Contained in the Chart-OFC distribution. |
package Chart::OFC::AxisLabel; BEGIN { $Chart::OFC::AxisLabel::VERSION = '0.10'; } use strict; use warnings; use Moose; use MooseX::StrictConstructor; use Chart::OFC::Types; with 'Chart::OFC::Role::OFCDataLines'; has label => ( is => 'ro', isa => 'Str', required => 1, ); has text_color => ( is => 'ro', isa => 'Chart::OFC::Type::Color', coerce => 1, default => '#000000', ); has text_size => ( is => 'ro', isa => 'Chart::OFC::Type::Size', default => 20, ); sub _ofc_data_lines { my $self = shift; my $name = shift; return $self->_data_line( $name . '_legend', $self->label(), $self->text_size(), $self->text_color() ); } no Moose; __PACKAGE__->meta()->make_immutable(); 1; # ABSTRACT: A label for an axis
__END__