| Justin Patrin 2006-04-27, 7:01 pm |
| On 4/27/06, Frank H=F8vin <frank@neuni.com> wrote:
> Ok, I know this is still in beta, but it obviously seems to work for othe=
rs.
>
>
>
> 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 =96 after discovering that having html code b=
efore
> the code making the graphs garbles them =96
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 =3D& $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 =96 titles, labels etc. are all blank.
>
>
>
> Any ideas?
>
>
>
>
>
> "One of the major reasons for the fall of the Roman empire was that, lack=
ing
> the number zero, they had no way to effectively terminate their C program=
s."
>
>
>
>
>
--
Justin Patrin
|