Image_Graph help
| From: | Jim Kusznir | Date: | Wed, 28 Dec 2005 01:00:33 +0000 |
| Subject: | Image_Graph help | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-22355@lists.php.net to get a copy of this message | ||
Hello all:
I'm attempting to use Image_Graph PEAR module, but running into a design
problem.
I'm trying to make a line graph with two plots that are plotting y-values
against time (x axis). Currently I'm representing time as an integer:
20051227165200 for 4:52pm Dec 27, 2005. I already discovered this overran
the size of int in PHP, so I'm using bcmod to chop off the year (4 most
signifiant digits). However, this is still resulting in large graph
discontinuities due to the non-continous nature of dates represented in that
form (i.e., there is no such date 20051227479372). The resulting graph
looks like the one here:
http://www.kusznir.net/~kusznir/ImageGraphEx1.png
Note the large spaces with simply a connecting line inbetween.
So, I'm wondering if any solution or workaround exists. I've thought about
using a Image_Graph_Axis_Category for my X-axis, but this won't work as I'm
going to be plotting two different plots, and they won't have data points at
the same time. Ideally, the resulting scale will also make sence to a
human.
Any ideas? Is there a type I don't know about for storing Time (or even a
"best practices")? I'm new to PHP (although been programming off and on in
Java, C, and C++ for a while now).
Thanks!
--Jim