NAME
Chart::Clicker::Simple - Simple Clicker Chart
DESCRIPTION
Clicker's API can be a bit daunting for simple work. This class aims to make it a bit more simple.
SYNOPSIS
use Chart::Clicker::Simple;
use Chart::Clicker::Line;
my $simple = new Chart::Clicker::Simple({
# Add two sets of data!
data => [
{
keys => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ],
values => [ 2, 6, 8, 3, 5, 9, 1, 3, 1, 7 ]
},
{
keys => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ],
values => [ 4, 4, 5, 8, 12, 7, 0, 5, 4, 10 ]
}
],
domain_label => 'Danes',
range_label => 'Footballs',
renderer => new Chart::Clicker::Renderer::Line()
});
$simple->draw();
METHODS
Constructor
- new
-
Creates a new Chart::Clicker::Simple object. You can specify the following values in the hash to influence the underlying Chart::Clicker object:
- data
-
An arrayref of hashrefs. Each hashref should have the two keys; one named keys and the other values. These two keys should contain arrayrefs that contain the data. See the Synopsis for an example.
- domain_label
-
The label for the domain axis.
- range_label
-
The label for the range axis.
- height
-
Height of the chart.
- width
-
Width of the chart.
- renderer
-
Required! The renderer to use for this chart.
Class Methods
None.
AUTHOR
Cory 'G' Watson <gphat@cpan.org>
SEE ALSO
Chart::Clicker
LICENSE
You can redistribute and/or modify this code under the same terms as Perl itself.