The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Hypatia::Chart::Clicker::Options::Axis - Options to apply to axes in Chart::Clicker via Hypatia

VERSION

version 0.026

NOTE

Attributes of the following object types can be coerced from the following:

  • Graphics::Color::RGB from either a hash reference with keys of r, g, b, and a (and values between 0 and 1) or a number between 0 and 1 that is passed in for each of r, g, b, and a.

  • Chart::Clicker::Data::Range (for axis ranges) from an array reference of two numbers, the first of which needs to be smaller than the second. The numbers in question are passed into the min and max attributes of the Chart::Clicker::Data::Range object in question.

  • Graphics::Primitive::Font from a hash reference.

Also, the attributes denoting positions are enums with values of north, south, east, west, and center.

ATTRIBUTES

color

The color of the axis. Of course, this is a Graphics::Color::RGB object.

format

Either a format string that is passed to each tick label via sprintf or a code reference that is used to format the label values. See Chart::Clicker::Axis for more information.

The default is %s.

fudge_amount

The percentage (expressed as a number between 0 and 1) by which the axis will grow at both ends (as a "fudge factor").

The default is 0.

hidden

A boolean value to determine whether or not the axis will be hidden on the plot. The default is 0.

label

The label of the axis. This attribute is optional.

label_color

A Graphics::Color::RGB object representing the color of the label.

label_font

A Graphics::Primitive::Font object representing the font of the label. See Graphics::Primitive::Font for the particulars.

position

The position of the axis on the chart (one of left, right, top, or bottom). This attribute is optional.

range

A Chart::Clicker::Data::Range object representing the range of the axis. This attribute is optional.

show_ticks

A boolean representing whether or not ticks and labels should be shown for the given axis. The default is 1.

staggered

A boolean representing whether or not the tick labels alternate between one side of the axis and the other. The default is 0.

skip_range

A Chart::Clicker::Data::Range object. If supplied, this range of values will be skipped completely on the axis. See Chart::Clicker::Axis for more details.

tick_font

A Graphics::Primitive::Font object representing the font for the tick labels.

tick_label_angle

The angle--measured in radians--to rate the tick labels. The default is 0.

tick_label_color

A Graphics::Color::RGB object representing the color of the tick labels. The default is black.

tick_labels

An array reference of labels to apply to ticks (in order). See Chart::Clicker::Axis for more details.

tick_values

An array reference of values denoting where the ticks should be on the axis. See Chart::Clicker::Axis for more details.

ticks (a.k.a. num_ticks)

The number of ticks to show. See Chart::Clicker::Axis for more details.

AUTHOR

Jack Maney <jack@jackmaney.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Jack Maney.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.