StatusBoard::Graph::DataSeq - datasequences representation for the StatusBoard::Graph
version 1.0.1
use StatusBoard::Graph::DataSeq; my $ds = StatusBoard::Graph::DataSeq->new(); $ds->set_title("X-Cola"); $ds->set_values( [ 2008 => 22, 2009 => 24, 2010 => 25.5, 2011 => 27.9, 2012 => 31, ] );
This is and class StatusBoard::Graph::DataSeq that is used in StatusBoard::Graph.
This a constuctor. It creates StatusBoard::Graph object. It don't need any parameters.
my $ds = StatusBoard::Graph::DataSeq->new();
Sets title for the datasequences. This parameter is mandatory.
$ds->set_title("X-Cola");
Returns the title of the object or dies if there is no title.
Sets the color for the datasequence. Color values can be yellow, green, red, purple, blue, mediumGray, pink, aqua, orange, or lightGray.
If the color is not set then StatusBoard App will choose the color randomly.
Returns bool value if the color is set.
Returns the color or dies if no color is set.
Sets the values for the datasequence. The method shuold recieve arrayref with pairs of values. First element in the pair will be used for the title and the second will be used for the value.
$ds->set_values( [ 2008 => 22, 2009 => 24, 2010 => 25.5, 2011 => 27.9, 2012 => 31, ] );
Returns the values or dies if there are no values.
Several move things should be done.
Check that color is one of yellow, green, red, purple, blue, mediumGray, pink, aqua, orange, or lightGray
Die if the title is not set
has_values()
Ivan Bessarabov <ivan@bessarabov.ru>
This software is copyright (c) 2013 by Ivan Bessarabov.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install StatusBoard::Graph, copy and paste the appropriate command in to your terminal.
cpanm
cpanm StatusBoard::Graph
CPAN shell
perl -MCPAN -e shell install StatusBoard::Graph
For more information on module installation, please visit the detailed CPAN module installation guide.