PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Sep 23, 2019 10:26 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Jun 15, 2009 1:45 pm 
Offline
Forum Commoner

Joined: Mon Jun 15, 2009 1:36 pm
Posts: 51
I'm very very new to php so please help me out. I've created a form on my site that requires a users inputs... I've created an output site in php with calculations of the users inputs but I also want to show the output with charts and graphs among text, for example a chart of how a user's age (let's just say) compares to a pool of other ages... Does anyone know how I can achieve this and using what program if there is one... Thanks


Top
 Profile  
 
PostPosted: Mon Jun 15, 2009 2:40 pm 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W
jpGraph and pChart are two popular PHP graphing libraries.

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
PostPosted: Mon Jul 13, 2009 6:48 am 
Offline
Forum Newbie

Joined: Mon Jul 13, 2009 6:37 am
Posts: 2
hello,

you might just want to have a look at FusionCharts at http://www.fusioncharts.com or FusionCharts Free at http://www.fusioncharts.com/free. They integrate very well with PHP using their native PHP API and offer nice charting options. If you face any problems, I'll be glad to help.

thanks
Rohit


Top
 Profile  
 
PostPosted: Thu Jul 16, 2009 11:23 pm 
Offline
Forum Commoner

Joined: Mon Jun 15, 2009 1:36 pm
Posts: 51
Ok, I downloaded FusionCharts and installed it... now O can't get it to run with users's data from a from..for example if a customer inputs variableA=100 and variableB=45, I get a percentage 45/100 = 45%, I want to show a pie chart wiht 45% and 55%, but it looks like it only takes data from mySQL..


Top
 Profile  
 
PostPosted: Mon Jul 20, 2009 1:09 am 
Offline
Forum Newbie

Joined: Mon Jul 13, 2009 6:37 am
Posts: 2
Hi Podarum,

It appears from their documentation that FusionCharts works only with XML data. So you need to convert data to FusionCharts XML format which you are taking input from a form. They have an example for the same at FusionCharts_Evaluation/Code/PHPClass/FormBased location.
Check it out.


Top
 Profile  
 
PostPosted: Tue Jul 28, 2009 2:21 pm 
Offline
Forum Newbie

Joined: Tue Jul 07, 2009 5:37 pm
Posts: 9
I also need graphics in my PHP program, so I took the advice given in this thread and immediately ran into problems that seem insurmountable:

(1) jpGraph
http://www.aditus.nu/jpgraph/
Their downloaded file is in TAR format, I had to struggle with first downloading the installing 7-Zip to unzip it, I believe it required two separate unzips, for some reason, then I got a file broken message when I tried to unzip it, despite it having been posted on their site just a few days ago. I notified the company but they're in Sweden, and I couldn't attach a screen snap of their error because they force responses via an e-mail service that doesn't disclose their e-mail address.

(2) pChart
http://pchart.sourceforge.net/
http://pchart.sourceforge.net/documentation.php
None of the two sample code pieces I used that they posted would work at all. The links aren't recognized. I can't tell if GD library is installed, despite my installing it 2-3x. The line that needs to be uncommented is already uncommented, so their only FAQ regarding their program not working is useless. Their documentation is absolutely filled with misspellings and grammatical errors. I don't have a clue what is wrong, and I can't figure out from their documentation how to get anything working. Do I need to use a special path? Include a special command in my code? Install something else? Did I install it too many times? I have no idea and their documentation is of no help, as far as I can see.

I'll try the other code somebody suggested in this thread, since the two programs I mentioned seemed to be total dead ends.


Attachments:
unopen_error.jpg
unopen_error.jpg [ 113.83 KiB | Viewed 5091 times ]
unzip_error.jpg
unzip_error.jpg [ 32.18 KiB | Viewed 5095 times ]
Top
 Profile  
 
PostPosted: Tue Jul 28, 2009 2:37 pm 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group