Finance-ChartHist

 view release on metacpan or  search on metacpan

lib/Finance/ChartHist.pm  view on Meta::CPAN

246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
    
  ## 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.960 second using v1.01-cache-2.11-cpan-49f99fa48dc )