Jump to content

php , Java and graphs


LittleB

Recommended Posts

Hello everybody,

 

I am not sure whether I should use php, java or mysql forums to post my question so please forgive me if this is the wrong place for it :)

 

Is it possible to create graphs using php? I have a database linked to a webpage (html) and php is used to allow data entry. I am familiar with Java, can Java have access to the database via php to draw graphs and charts e.g. pie charts. If not is there anyway graphs can be drawn using php?

 

Any suggestions?

 

Many thanks!

Link to comment
https://forums.phpfreaks.com/topic/147851-php-java-and-graphs/
Share on other sites

php gd

 

imagecreate

 

however there is this opensource graphing flash application which I seen my friend's company use which looked really good, but I don't usually use opensource stuff, not even JQuery :) (But I'm debating whether I should lol)

 

 

Link to comment
https://forums.phpfreaks.com/topic/147851-php-java-and-graphs/#findComment-776047
Share on other sites

Hi

 

You can do it manually using imagecreate(), and for a very simple graph this may be easiest. I have done it this way for simple things (eg, a graph of posts by month on a forum I run).

 

Since then I have started to write a php graph class. However this is a lot more difficult than I first thought it would be. Eg, if you have a line graph of values against dates, what do you do when there is no value for that date, either default the value to zero for that date or just draw a line from the value of the previous date to the value of the next date. I can forward you the graph class as it exists so far, but while is is basically all there for what I use it for I would not say it is fully debugged. And I have not done anything on pie charts in it yet.

 

Basically I have used php to generate a page with an image tag on the page, with the source being another php script to generate the required graph.

 

All the best

 

Keith

Link to comment
https://forums.phpfreaks.com/topic/147851-php-java-and-graphs/#findComment-776236
Share on other sites

kickstart,

 

    The best there is: http://www.aditus.nu/jpgraph/

 

    Discussion forum found here: http://jpgraph.intellit.nl/index.php

 

Scot L. Diddle, Richmond VA

 

 

Link to comment
https://forums.phpfreaks.com/topic/147851-php-java-and-graphs/#findComment-776248
Share on other sites

Hello all and thanks very much for all your replies.

 

I found some php libraries that generate graphs e.g. libChart and jpGraph (as suggested by ScottDiddle). the first line of the php code (for libChart) is

include "libchart/libchart.php";

 

Is there a particular place/folder to store the library in? Any idea where?

 

Many thanks!!!!!!

Link to comment
https://forums.phpfreaks.com/topic/147851-php-java-and-graphs/#findComment-782768
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.