I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-09-21 11:17:03-07 by hwde
FreeBSD, perldoc Chart::Clicker sample produce only a frame

Hi, I wonder if I am doing anything wrong. I copied the example code from perldoc Chart::Clicker into a perl file. But the PNG created contains only a black rectangle on white background.

Then I picked one file from the test directory, one with Chart::Clicker::Simple, same result.

I am not new to perl, programming websites fulltime more than 6 years, so I hopefully make no mistakes :-)

It would be nice to know if the sample is ok, so I can dig into the code to see whats going wrong. The perl GD library module is working perfect, because I use it very very often.

Regards

Heiko

Direct Responses: 10509 | Write a response
Posted on 2009-04-21 15:16:52-07 by lattenwald in response to 6100
Re: FreeBSD, perldoc Chart::Clicker sample produce only a frame

Sorry for reviving likely dead thread.

Trouble is still there. Example runs fine on both my home Linux box and FreeBSD server, most modules are installed user-locally from cpan. On linux (debian) I get a good picture, file size 23Kb, on freebsd I get an empty picture, file size 680B

perl -d shows differences after $cc->prepare: |x $cc shows different minimum_width and minimum_height values for components.

Any hints?

Direct Responses: 10510 | 10609 | Write a response
Posted on 2009-04-21 15:23:53-07 by hwde in response to 10509
Re: FreeBSD, perldoc Chart::Clicker sample produce only a frame
Sorry, I never received a response and didn't spend time into this issue. Heiko
Direct Responses: Write a response
Posted on 2009-05-06 09:28:20-07 by duncs in response to 10509
Re: FreeBSD, perldoc Chart::Clicker sample produce only a frame
I am having this problem at the moment on Debian Etch. Of the example scripts, line-and-shape.pl and tufte-whitegrid.pl give me blank graphs (black border, horizontal line, nothing else), whereas overaxis-bar.pl and sparkline.pl produce something reasonable. simple.pl doesnt even run for me. This is on 2.20, no errors during the build process and all tests pass.
Direct Responses: 10828 | Write a response
Posted on 2009-05-26 13:43:54-07 by lattenwald in response to 10609
Re: FreeBSD, perldoc Chart::Clicker sample produce only a frame

Got new info: trouble is in Graphics::Primitive::TextBox.

Make all stuff that contains TextBoxes invisible.

Say, $cc is your Chart::Clicker object. Do following:

$cc->legend->visible(0); for(values %{$cc->contexts}) { $_->domain_axis->visible(0); $_->range_axis->visible(0); } $cc->draw;

and everything works (at least, at my FreeBSD box). I think there is trouble with fonts location or something like that, going to dive into that a bit deeper.

Direct Responses: 10838 | Write a response
Posted on 2009-05-27 12:02:02-07 by lattenwald in response to 10828
Re: FreeBSD, perldoc Chart::Clicker sample produce only a frame

More info:
Graphics::Primitive::Driver::Cairo::get_text_bounding_box function calls Cairo::Context::text_extents

$exts = $context->text_extents($text);

(line 761 in my version). This function returns good results on my Linux box (debian Squeeze/Sid) and bad results on FreeBSD box. I mean, on FreeBSD Cairo::Context says that my text takes no space at all. This is a call to libcairo.so's function, if I understand correctly.

Now I am playing with recompiling cairo, but I don't believe in success. Any hints?

Direct Responses: 10844 | Write a response
Posted on 2009-05-28 09:10:17-07 by lattenwald in response to 10838
Re: FreeBSD, perldoc Chart::Clicker sample produce only a frame

Solved.

In my case problem was in fontconfig: it was too old (2.4.something).

Solution: upgrade fontconfig, freetype, and cairo to the latest available versions. Not sure if freetype is really needed. For Pango with Cairo support it is needed.

Good luck!

Direct Responses: 10845 | Write a response
Posted on 2009-05-28 09:19:28-07 by lattenwald in response to 10844
_SOLVED_ FreeBSD, perldoc Chart::Clicker sample produce only a frame
sorry, forgot to change title in previous post :)
Direct Responses: Write a response