Zooming the graphs

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
manohar
Posts: 2
Joined: Wed Jul 17, 2002 10:00 am

Zooming the graphs

Post by manohar »

Hi,

I would like to put some link below graph to Zoom In and Out. I can see if I change the value of width and height in the database, I see the effect. Is there any way I can send some parameters through the link so that :

- In general it will show the default size
- If clicked on Zoom in, it shall increase the height and weight with some value
- If clicked on Zoom out, it shall decrease the height and weight with some value

Can anyone give me some hint which file I have to play with for this? Is this to do with functions or I can have something controlled from graph_image.php?

Regards
Manohar
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

This should not be too hard actually. You can use the following URL for reference:

Code: Select all

graph_image.php?graphid=6&rraid=1&graph_start=-86400&graph_height=100&graph_width=300
By manipulating this string, you can in effect change the size and history of the graph.

-Ian
tibbs
Posts: 1
Joined: Fri Sep 13, 2002 7:47 pm

Got it working

Post by tibbs »

I tweaked graph.php just a bit to add a zoom button to the first graph; it's probably not completely correct but it seems to work for me. Plus, I've never written a line of PHP before; I just pretended it was Perl.

You can fetch the result at http://www.math.uh.edu/~tibbs/graph.php.txt
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests