#!/usr/bin/perl -w use strict; use diagnostics; use Data::Table; use GD::Graph::bars; my $table = new Data::Table( [ [ 20070410, 20070415, 20070417 ], [ 10, 20, 15 ] ], [ 'A', '+B' ], 1 ); print $table->html; for my $graph ( GD::Graph::bars->new( 700, 150 ) ) { $graph->set( 'y_number_format' => '%d', transparent => 0, values_vertical => 1, show_values => 1, ); $graph->set( 'x_labels_vertical' => 1 ); my $gd = $graph->plot( $table->colRefs( [ 0, 1 ] ) ); open( IMG, ">voorraad.png" ) or die $!; binmode IMG; print IMG $gd->png; close IMG; }