1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use strict; use Chart::StackedBars; # (type is one of: Points, Lines, Bars, LinesPoints, Composite,StackedBars, Mountain, Pie, HorizontalBars, Split, ErrorBars, Pareto, Direction) use GD; my $font = GD::Font->Giant; my $obj = Chart::StackedBars->new (740,430); $obj->set ( 'title' => "Jahresübersicht 2012", 'legend' => 'none', 'y_grid_lines' => 'true', 'title_font' => $font, 'precision' => 0, 'min_val' => 0, 'colors' => {'grid_lines' => [192,192,192]} ); @data = ( [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ], [ 150, 180, 210, 190, 175 ] ); $obj->png ( "chart.png", \@data );
2012-04-04T09:50:39 KeanIch beschäftige mich immer noch mit dem Thema Charts und bin mittlerweile bei dem Modul Chart gelandet.
1
2
3
4
5
6
GD Version 2.46.0.0 Perl 5.6 / 5.8 / 5.10 / 5.12 / 5.14
Author: Lincoln Stein <lstein (at) cshl.org>
Abstract: Interface to Gd Graphics Library (GIF support)
Note: Compiled with gd-2.0.35 zlib-1.2.3 libpng-1.2.37 jpeg-6b giflib-4.1.6 FreeType2-2.3.9.
For installation, cut and paste in a DOS console:
ppm install http://www.bribes.org/perl/ppm/GD.ppd