Chart-Clicker
view release on metacpan or search on metacpan
lib/Chart/Clicker.pm view on Meta::CPAN
$cc->title->font->size(20);
# etc, etc
If the title has text then it is added to the chart in the position specified
by C<title_position>.
You should consult the documentation for L<Graphics::Primitive::TextBox> for
things like padding and text rotation. If you are adding it to the top and
want some padding between it and the plot, you can:
$cc->title->padding->bottom(5);
=head2 title_position
The position the title will be added. Should be one of north, south, east,
west or center as required by L<Layout::Manager::Compass>.
Note that if no angle is set for the title then it will be changed to
-1.5707 if the title position is east or west.
=head2 width
Set/Get the width. Defaults to 500.
=head1 METHODS
=head2 context_count
Get a count of contexts.
=head2 context_names
Get a list of context names.
=head2 delete_context ($name)
Remove the context with the specified name.
=head2 get_context ($name)
Get the context with the specified name
=head2 set_context ($name, $context)
Set a context of the specified name.
=head2 add_to_datasets
Add the specified dataset (or arrayref of datasets) to the chart.
=head2 dataset_count
Get a count of datasets.
=head2 get_dataset ($index)
Get the dataset at the specified index.
=head2 rendered_data
Returns the data for this chart as a scalar. Suitable for 'streaming' to a
client.
=head2 add_to_over_decorations
Add an over decoration to the list.
=head2 get_over_decoration ($index)
Get the over decoration at the specified index.
=head2 over_decoration_count
Get a count of over decorations.
=head2 add_to_contexts
Add the specified context to the chart.
=head2 add_subgraph
Add a subgraph to this chart.
=head2 draw
Draw this chart.
=head2 get_datasets_for_context
Returns an arrayref containing all datasets for the given context. Used by
renderers to get a list of datasets to chart.
=head2 add_data ($name, $data)
Convenience method for adding data to the chart. Can be called one of three
ways.
=over 4
=item B<scalar>
Passing a name and a scalar will append the scalar data to that series' data.
$cc->add_data('Sales', 1234);
$cc->add_data('Sales', 1235);
This will result in a Series named 'Sales' with two values.
=item B<arrayref>
Passing a name and an arrayref works much the same as the scalar method
discussed above, but appends the supplied arrayref to the existing one. It
may be mixed with the scalar method.
$cc->add_data('Sales', \@some_sales);
$cc->add_data('Sales', \@some_more_sales);
# This works still!
$cc->add_data('Sales', 1234);
=item B<hashref>
( run in 1.230 second using v1.01-cache-2.11-cpan-140bd7fdf52 )