ChartDirector [problem]

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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

my $longueur = $a+$t+$g+$c;
print( NUCDAT $a." ".$c." ".$t." ".$g." ".$longueur);

print "<IMG SRC=\"http://localhost/cgi-bin/\">\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;

while( defined( $ligne = <NUCDAT> ) ) {
        ($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);



print "Content-type: image/png\n\n";
print $c->makeChart2($perlchartdir::PNG);

Does someone knows how to help me?


(PS : my config : FireFox 1.0.7, EasyPHP 1.7, Perl 5.8.7 Builder

Site Timeline