ChartDirector [problem]
- From: "Le_T" <t.poisot@xxxxxxxxx>
- Date: 14 Oct 2005 09:33:09 -0700
Hello all
I'm currently developping a cgi script which use ChartDirector, and I
have a HUGE problem with drawing...
Diagram displays correctly, but bars doesn't stop, and continue til the
top of the image zone.
Here is following my code:
main script :
use strict;
use warnings;
use CGI;
use CGI::Pretty;
use CGI::Carp qw(fatalsToBrowser);
#...
#all values are defined and are numeric
open(NUCDAT,">nucl.chartdata");
my $longueur = $a+$t+$g+$c;
print( NUCDAT $a." ".$c." ".$t." ".$g." ".$longueur);
close(NUCDAT);
print "<IMG SRC=\"http://localhost/cgi-bin/nucl_chart.pl\">\n\n";
#...
#there is no problem with the acces rights to file
diagram drawing script :
use File::Basename;
use lib dirname($0);
use perlchartdir;
my $ligne, $a, $t, $g, $c, $longueur;
open(NUCDAT,"<nucl.chartdata");
while( defined( $ligne = <NUCDAT> ) ) {
chomp($ligne);
($a, $t, $g, $c, $longueur) = split(/ /,$ligne);
}
my $pcc = abs($c/$longueur);
my $pct = abs($t/$longueur);
my $pcg = abs($g/$longueur);
my $pca = abs($a/$longueur);
my $labels = ["A", "T", "G", "C"];
my $ylabels = [0, 25, 50, 75, 100];
my @data = [\$pca ,\$pct ,\$pcg ,\$pcc ];
my $c = new XYChart(150, 150);
$c->setPlotArea(30, 20, 100, 100);
$c->addBarLayer(@data);
$c->xAxis()->setLabels($labels);
$c->yAxis()->setLabels($ylabels);
binmode(STDOUT);
print "Content-type: image/png\n\n";
print $c->makeChart2($perlchartdir::PNG);
Does someone knows how to help me?
Le_T
(PS : my config : FireFox 1.0.7, EasyPHP 1.7, Perl 5.8.7 Builder
813)
.
- Prev by Date: Re: CGI param persists when used with FastCGI
- Next by Date: Re: LWP - multipart/form-data file upload from scalar rather than local file
- Previous by thread: Perl Class::Struct
- Next by thread: RFC: Astro::ECI (or Astro::Coord::ECI, or ...)
- Index(es):
Relevant Pages
|
|