Chart-Clicker
view release on metacpan or search on metacpan
lib/Chart/Clicker/Axis.pm view on Meta::CPAN
=head2 height
The height of the axis.
=head2 width
This axis' width.
=head2 tick_label_angle
The angle (in radians) to rotate the tick's labels.
=head2 tick_division_type
Selects the algorithm for dividing the graph axis into labelled ticks.
The currently included algorithms are:
L<Chart::Clicker::Data::DivisionType::Exact/Exact>,
L<Chart::Clicker::Data::DivisionType::LinearRounded/LinearRounded>.
You may write your own by providing a Moose Role which includes Role
L<Chart::Clicker::Data::DivisionType> and prefixing the module name
with + when setting tick_division_type.
Chart::Clicker::Axis->new(tick_division_type => '+MyApp::TickDivision');
This value should only be set once per axis.
=head2 baseline
The 'baseline' value of this axis. This is used by some renderers to change
the way a value is marked. The Bar render, for instance, considers values
below the base to be 'negative'.
=head2 brush
The brush for this axis. Expects a L<Graphics::Primitve::Brush>.
=head2 color
The color of the axis' border. Expects a L<Graphics::Color::RGB> object.
Defaults to black.
=head2 format
The format to use for the axis values.
If the format is a string then format is applied to each value 'tick' via
sprintf. See sprintf perldoc for details! This is useful for situations
where the values end up with repeating decimals.
If the format is a coderef then that coderef will be executed and the value
passed to it as an argument.
my $nf = Number::Format->new;
$default->domain_axis->format(sub { return $nf->format_number(shift); });
=head2 fudge_amount
The amount to 'fudge' the span of this axis. You should supply a
percentage (in decimal form) and the axis will grow at both ends by the
supplied amount. This is useful when you want a bit of padding above and
below the dataset.
As an example, a fugdge_amount of .10 on an axis with a span of 10 to 50
would add 5 to the top and bottom of the axis.
=head2 hidden
This axis' hidden flag. If this is true then the Axis will not be drawn.
=head2 label
The label of the axis.
=head2 label_color
The color of the Axis' labels. Expects a L<Graphics::Color::RGB> object.
=head2 label_font
The font used for the axis' label. Expects a L<Graphics::Primitive::Font> object.
=head2 layout_manager
Set/Get the Layout Manager. Defaults to L<Layout::Manager::Absolute>.
=head2 orientation
The orientation of this axis. See L<Graphics::Primitive::Oriented>.
=head2 position
The position of the axis on the chart.
=head2 range
The Range for this axis. Expects a L<Chart::Clicker::Data::Range> object.
You may use this to explicitly set an upper and lower bound for the chart:
$axis->range->max(1000);
$axis->range->min(1);
=head2 show_ticks
If this is value is false then 'ticks' and their labels will not drawn for
this axis.
=head2 staggered
If true, causes horizontally labeled axes to 'stagger' the labels so that half
are at the top of the box and the other half are at the bottom. This makes
long, overlapping labels less likely to overlap. It only does something
useful with B<horizontal> labels.
=head2 skip_range
Allows you to specify a range of values that will be skipped completely on
this axis. This is often used to trim a large, unremarkable section of data.
If, for example, 50% of your values fall below 10 and 50% fall above 100 it
is useless to bother charting the 10 to 100 range. Skipping it with this
( run in 0.796 second using v1.01-cache-2.11-cpan-39bf76dae61 )