ChartDirector [problem]



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)

.



Relevant Pages

  • Re: Visual Scripting component (maybe flowcharting)
    ... > TMS Software has also Diagram Studio, which is a tool to build diagrams ... > Studio and Diagram Studio, in order to provide a powerful tool for visual ... What I would like to see is the ability for an end user to design a script ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Visual Scripting component (maybe flowcharting)
    ... >> Studio and Diagram Studio, in order to provide a powerful tool for visual>> scripting. ... > The TMS diagramming components are actually very high on the list of> components to use if I have to build this myself. ... > What I would like to see is the ability for an end user to design a script> visually, and have the resulting script be serializable. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: ssi and Perl/CGI
    ... How do I go about passing variables to the script via include virtual ... I'll give cmd a whirl, though cgi seems to work great if all my page ... content is coming from the CGI script. ...
    (perl.beginners)
  • Re: CGI Question
    ... leftframe.cgi, not javascript. ... > a CGI script (and it's initially called with NO ... > and the right frame contains an HTML file. ...
    (perl.beginners)
  • Re: Program to draw chess boards
    ... script, good for automating the drawing of many boards). ... The best is TeX solution -- not exactly drawing chess boards, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)