Hi,
I'm using the JpGraph library to make a graphic from a mysql database.
My problem is that i have around 2000 data for one graphic and the label on
X-axis (1,2,3,...,2000) are to small and there are too many .
How can i only print a X label every 10 or 50 ??
I have read the JpGraph manual and they say this:
1.1 Adjusting the ticks on a text scale
As can be seen in the previous example (9) the X-axis is slightly cluttered
with the labels very close to each other. We might rectify this by either
enlarging the image or just displaying every second tick label on the
x-axis.
Specifying that we only want to print every second label on the axis is done
by a call to the method
SetTextTicks() as
$graph->xaxis->SetTextTicks(2);
There is one important thing to remember with this. The $datax array must be
adapted to only contain every second value as well! My reasoning behind this
design decision is that when you have many Y-values, perhaps a couple of
hundred, and only wants to have an X label on every 100 you shouldn't have
to specify all the labels you don't use.
So now we also change $datax to
$datax=array("Jan","Mar","Maj","July","Sep");
But this work ok for a static array, and my array is dynamic, and I can't
know
if it will have 1000 or 2000 data ...
How can i do that with the mysql database???
Does someone knows another library like Jpgraph that could hel me??
Hope i was clear enought...
Thanks in advance,
Rgds,
Voodoo