Finance-ChartHist
view release on metacpan or search on metacpan
lib/Finance/ChartHist.pm view on Meta::CPAN
## Set up the data into the required format
my @formated_data = ();
foreach my $symbol (@{ $self->{symbols} }) {
push @formated_data, $graph_data->{$symbol}[1];
}
unshift @formated_data, $graph_data->{$self->{symbols}[0]}[0];
$graph->plot(\@formated_data) or die $graph->error;
## Set the legend
$graph->set_legend( ["BHP", "PIXR"] );
## Keep a copy of the graph
$self->{graph} = $graph;
}
##
## Figure out the range of the share price, and
## calculate what limits we will put on the y-axis
## of the graph
( run in 0.639 second using v1.01-cache-2.11-cpan-49f99fa48dc )