cosmicsoup has asked for the wisdom of the Perl Monks concerning the following question:
The exact error I'm getting is "no data sets or points at /data/cgi/machines.cgi line 28". Line 28 is the plotting line. Any suggestions?File Contents of all_space.dat: adsrv2h,5 cibs1host,34 cibs2host,53 dw04host,44 dw06host,43 dwrdb1,77 dwr1dv,3 etl1host,78 etl2host,17 m03host,64 --------------------- #!/usr/local/bin/perl use CGI ':standard'; use GD::Graph::Data; use GD::Graph::bars; use strict; my $data = GD::Graph::Data->new(); my @data; $data->read(file =>'/data/space/all_space.dat', delimiter => ','); my $mygraph = GD::Graph::bars->new(500, 300); $mygraph->set( x_label => 'Machines', y_label => 'Percent of used space', title => 'Machines - Disk Availablility', ) or warn $mygraph->error; my $myimage = $mygraph->plot(\@data) or die $mygraph->error; print "Content-type: image/png\n\n"; print $myimage->png;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Issues with GD::Graph::Data
by Happy-the-monk (Canon) on Jun 28, 2004 at 16:29 UTC |