Re: Image_Graph problems
| From: | Justin Patrin | Date: | Thu, 27 Apr 2006 20:24:12 +0000 |
| Subject: | Re: Image_Graph problems | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23870@lists.php.net to get a copy of this message | ||
On 4/27/06, Frank Høvin <frank@neuni.com> wrote:
> Ok, I know this is still in beta, but it obviously seems to work for others.
>
>
>
> I'm trying the examples at
> http://pear.veggerby.dk/samples/, since there are
> no documentation at the PEAR site.
>
There are always API docs as well and while they might not be as user
friendly, they still work for finding what you need.
> I get them to work, sort of – after discovering that having html code before
> the code making the graphs garbles them –
Of course. You can't output a binary file in the middle of your image.
Your image creation has to happen in a seperate request from your
normal page (or you have to create it, store it on the filesystem
instead of outputting it, then output an image tag for it).
>
> except that I can't get the titles and labels to show on the graphs. I've
> been playing around with the simple bar chart,
>
> but even though I use the exact same code as the examples, no text is
> showing. That is, the title and labels are blank
>
> when I run the code, but when I run the examples from the veggerby site,
> they are showing.
>
First thing to try is to set error_reporting to E_ALL (E_ALL
&~E_STRICT if you're using PHP5). See if any errors pop up. Second,
perhaps you're missing some fonts that the package needs.
>
>
> F.ex: This line
>
>
>
> $Plot =& $Plotarea->addNew('bar', array(&$Dataset));
>
>
>
> should display the title "bar" under the chart. But it doesen't. And the
> same goes with all the other examples when I
>
> run them myself – titles, labels etc. are all blank.
>
>
>
> Any ideas?
>
>
>
>
>
> "One of the major reasons for the fall of the Roman empire was that, lacking
> the number zero, they had no way to effectively terminate their C programs."
>
>
>
>
>
--
Justin Patrin