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

Message ListMessage List     Post MessagePost Message

  missing Y axis labels
Posted by Chris carlson on Feb-23-2024 02:17
Attachments:
Hi, i am moving to an updated server.. the old server is Ubuntu 18.04.6 LTS running perl 5.26, while the new server is Ubuntu 22.04.4 LTS running perl 5.34

my issue is that making no changes in the code, the Y axis labels disappear when generating graphs on the new server (see before and after pics).
i have tried changing different parameters but cant seem to get the Y axis labels to print.
please advise.  here is my code:


##  no text -> no title
my $title = $c->addTitle("", "Arial Italic", 1);

$c->setPlotArea(50, $title->getHeight(), $c->getWidth() - 65, $c->getHeight() - $title->getHeight()
     , 0xe8f0f8, -1, $perlchartdir::Transparent, $c->dashLineColor(0x888888, $perlchartdir::DotLine));


# Set axes to transparent
$c->xAxis()->setColors($perlchartdir::Transparent);
#$c->yAxis()->setColors($perlchartdir::Transparent);

## set axis increment to 1 to avoid fractions
$c->yAxis()->setMinTickInc(1);

# Add a mark at $markData
$c->yAxis()->addMark($markData, 0xff0000, $markData)->setLineWidth(3);

# Set the labels on the x axis
$c->xAxis()->setLabels($labels);

my $lineLayer = $c->addAreaLayer();

# Add the pareto line using deep blue (0000ff) as the color
$lineLayer->addDataSet($barData, 0x0000ff)->setDataSymbol($perlchartdir::DiamondSymbol, 9);

# Set the line width to 2 pixel
$lineLayer->setLineWidth(2);

# Adjust the plot area size, such that the bounding box (inclusive of axes) is 10 pixels from the
# left edge, just below the title, 15 pixels from the right edge, and 10 pixels above the legend
# box.
$c->packPlotArea(10, $title->getHeight(), $c->getWidth() - 15, $c->layoutLegend()->getTopY() - 10);



thanks in advance!
after.jpg
Before.jpg

  Re: missing Y axis labels
Posted by Peter Kwan on Feb-23-2024 04:21
Hi Chris,

I suspect it is due to fonts. The Installation section of the ChartDirector documentation suggests to copy "everything" inside "ChartDirector/lib", including all files and the fonts subdirectory, to your Perl module directory.

https://www.advsofteng.com/doc/cdperl.htm#install.htm

You may extract the ChartDirector for Perl to a directory, then go to the perldemo directory, and type "perl simplebar.pl". This should generate a bar chart. Please check if it contains the labels.

In your existing code, you can try the code below to see what it can find the font:

print perlchartdir::testFont("arial.ttf");

Best Regards
Peter Kwan

  Re: missing Y axis labels
Posted by Chris carlson on Feb-23-2024 05:14
thank you very much!  this was indeed the issue.

the fonts were actually there, but the permissions were screwed up when i copied the files over.  it was giving permission denied with the testfont command, but was failing silently on its own.  is there a log/debug command for this that we can use to turn on notifications like this?

  Re: missing Y axis labels
Posted by Peter Kwan on Feb-23-2024 12:09
Hi Chris,

ChartDirector only has the following debug API - testFont and getBootLog.

https://www.advsofteng.com/doc/cdperl.htm#perlchartdir.testFont.htm
https://www.advsofteng.com/doc/cdperl.htm#perlchartdir.getBootLog.htm

These two APIs addresses the two most common issues after ChartDirector starts up successfully. If ChartDirector cannot even start up, then it cannot produce error messages. The error messages should be produced by the program that tries to start it up, which is the Perl interpreter.

Best Regards
Peter Kwan

  Re: missing Y axis labels
Posted by Chris carlson on Feb-23-2024 22:06
ok thanks for the reply!