Graphicinterface for jPgraph
Posted: Wed 29 Dec 2010 6:44 pm
I've been playing with jPgraph beacause I want to select the graphs generated from the database (see the databasestructure made by David)
So I've made a form input with selectable months where you can select the graphs over which period you want to see them.
Thes are two files wich have to be placed in the jpgraph directory (folder) One is named zoek4.php and one is called grafiek7.php you can rename them but you wil have to change the name of zoek4.php in grafiek7.php if you rename zoek4.php and vice versa.
Call zoek4.php in your browser and there you go.
The are some issues I can't figure out, when you select the startdate after the enddate you get an error (this is logical) but I can't find a solution to 'catch' this error.
The second issue is that I can't render the grafic in a html page it appaers in a new window (I only managed to put a link under the graphic which goes back to the query interface).
One more thing (I think this is up to David in Scotland , the temperature values in the database are all rounded to values with no decimals so 5,4 is 5,0 in the database I thought they where wit a decimal ponit but I've a comma. (sorry for my English) suggestions and improvements are welcome
example: http://www.apeldoorn.tk/weer/grafiek/zoek4.php, my data are from end december 2009
example files in zip (note you must have the jpgraph package http://jpgraph.net/ installed on your server
So I've made a form input with selectable months where you can select the graphs over which period you want to see them.
Thes are two files wich have to be placed in the jpgraph directory (folder) One is named zoek4.php and one is called grafiek7.php you can rename them but you wil have to change the name of zoek4.php in grafiek7.php if you rename zoek4.php and vice versa.
Call zoek4.php in your browser and there you go.
The are some issues I can't figure out, when you select the startdate after the enddate you get an error (this is logical) but I can't find a solution to 'catch' this error.
The second issue is that I can't render the grafic in a html page it appaers in a new window (I only managed to put a link under the graphic which goes back to the query interface).
One more thing (I think this is up to David in Scotland , the temperature values in the database are all rounded to values with no decimals so 5,4 is 5,0 in the database I thought they where wit a decimal ponit but I've a comma. (sorry for my English) suggestions and improvements are welcome
example files in zip (note you must have the jpgraph package http://jpgraph.net/ installed on your server