ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Perl Simple Line Chart
Posted by seafree on Aug-22-2023 04:32
HI, please will you help me?

I had been created a SIMPLE LINE CHART, I had been use a Perl HoH and I had been use the references for got the data charts.

The HOH had been well created, I hab been verify using:

print Data::Dumper->Dump([%HoH]);

I had been print the axis X, Y:
print " AXISX: @$axisX
";
print " AXISY: @$axisY
";

AXIS X: "00:00","00:01","00:02","00:03","00:04","00:05","00:06","00:09","01:12","01:15",.....................,"12:53","12:59","13:02","13:20",........"23:56","23:57,"23:58","23:59",

AXIS Y:
-166.71,-175.43,-215.64,-208.62,402.50,401.00,401.00,402.01,400.50,-182,-174.00,.....................,-198.57,-243.74,402.1,403.99,........-271.12,-175.30,231.58,-179.19,

After and using Chartdirector, I han been create the XYChart

my $c= new XYChart(1000,640);
$c->setPlotArea(30,20,900,600);
$c->addLineLayer(@$ejeY)

##Set the labels on the X axis
$c->xAxis()->setLabels(@$ejeX);

##SHOW THE CHART
my $Chart1URL=$c->makeTmpFile("/tmp/tmpcharts");
my $imageMap= $c->getHTMLImageMap("","","title='{xLabel}:{value|0}%'");
.
..
.
print <<EndOfHTML

<img src="getchart.pl?img=/tmp/tmpcharts/$chart1URL" border="0" usemap"#map1">
<map name="map1"> $imageMap </map></center>
EndOfHTML
;

#OUTPUT the chart
binmode(STDOUT);
print $c->makeChart($perlchartdir::PNG);
exit;

I had been get WHITE SCREEN, please will you hel me?

REGARDS

  Re: Perl Simple Line Chart
Posted by Peter Kwan on Aug-22-2023 12:11
Hi seafree,

Please refer to my response in your earlier post:

https://www.chartdir.com/forum/download_thread.php?site=chartdir&bn=chartdir_support&thread=1692634878#N1692648954

Best Regards
Peter Kwan