#!"C:\perl\bin\perl.exe" use DBI; use POSIX qw(strftime); use GD::Graph::lines; use GD::Graph::colour; use GD::Text; use GD::Graph::Data; use warnings; use strict; my $data = GD::Graph::Data->new(); $data->read(file => "data.txt", delimiter => ','); my $graph = new GD::Graph::lines( 800, 600 ); $graph->set_title_font('arial.ttf', 20); $graph->set_values_font('arial.ttf', 5); $graph->set_x_label_font('arial.ttf', 12); $graph->set_y_label_font('arial.ttf', 12); $graph->set_x_axis_font('arial.ttf', 8); $graph->set_y_axis_font('arial.ttf', 12); $graph->set( y_label => 'Active', title => '===> flow <===', y_max_value => 120000, y_min_value => 70000, y_tick_number => 10, y_lable_skip => 2, x_tick_offset => 15, transparent => 1, values_vertical => 1, show_values => 1, line_width => 2, dclrs => [ qw(red)] ); my $gd = $graph->plot( $data ); open(IMG, ">chart.gif") or die $!; binmode IMG; print IMG $gd->gif; close IMG;