| Chart::Weather::Forecast::Temperature |
my $highs = [37, 28, 17, 22, 28];
my $lows = [18, 14, 5, 10, 18];
my $forecast = Chart::Weather::Forecast::Temperature->new(
highs => $highs,
lows => $lows,
chart_temperature_file => '/tmp/temperature_forecast.png',
);
$forecast->create_chart;
ArrayRef[Num] of high temperatures
Required at construction (new): yes
ArrayRef[Num] of low temperatures
Required at construction (new): yes
Where you want to write out the chart image.
Default: /tmp/temperature-forecast.png' on *nix
NOTE: The chart_temperature_file attribute isa 'Path::Class::File'
so if you want to specifiy an output file then do so like:
chart_temperature_file => Path::Class::File->new( $your_dir, $your_file_name); chart_temperature_file => Path::Class::File->new( '/tmp/', 'forecast_temps.png');
Chart dimension in pixels
Default: 240
Chart dimension in pixels
Default: 160
Format of the chart image
Default: png
=head2 title_text
The text to title the chart with.
Default: Temperature Forecast
This is the main method to call on an object to create a chart.
Here we do some initialization just after the object has been constructed. Calling these builders here helped me defeat undef occuring from lazy dependencies.
Mateu Hunter hunter@missoula.org
Copyright 2010, Mateu Hunter
You may distribute this code under the same terms as Perl itself.
| Chart::Weather::Forecast::Temperature |