We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,601 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Graph maker in PHP

Hi everyone,

I'm just looking for some graph makers for the data we have in our database. We would like to analyse the data taken out of the database and present it in a graph format to see who has got low/high ranks.

Is there any free API that we can use? if you know any, please do suggest it with a little mention about how difficult/easy to use it.

That will be so much appreciated.

4
Contributors
11
Replies
3 Days
Discussion Span
9 Months Ago
Last Updated
12
Views
rotten69
Master Poster
747 posts since May 2011
Reputation Points: 36
Solved Threads: 47
Skill Endorsements: 11

here is what I use, the best i could find so far.. i use with json for pull data out of db using php

Click Here

gabrielcastillo
Junior Poster in Training
54 posts since Apr 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0

Cool. Thanks for the website. and I hope it is easy to use.

rotten69
Master Poster
747 posts since May 2011
Reputation Points: 36
Solved Threads: 47
Skill Endorsements: 11

I'd recommend JqPlot... Although there are a few to choose from.

iamthwee
Posting Genius
6,254 posts since Aug 2005
Reputation Points: 1,567
Solved Threads: 476
Skill Endorsements: 33

I must say, HighCharts has excellent support, and I've been very happy with it for quite some time.

pritaeas
Posting Prodigy
Moderator
9,265 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,456
Skill Endorsements: 86

HighCharts has excellent support, and I've been very happy with it for quite some time.

Are they free to use?

rotten69
Master Poster
747 posts since May 2011
Reputation Points: 36
Solved Threads: 47
Skill Endorsements: 11

theuse Javascript mainly. Im getting my data from mysql db using php. Would I have to use JSON then?

rotten69
Master Poster
747 posts since May 2011
Reputation Points: 36
Solved Threads: 47
Skill Endorsements: 11

Yeah, Thanks to all of you sharing links.

rotten69
Master Poster
747 posts since May 2011
Reputation Points: 36
Solved Threads: 47
Skill Endorsements: 11

You don't have to use json, but for performance and easy maintenance I would recommend you use json.

Here is a simple function showing how to get the data and returning json encode string.

function get_chart_data(){

    $q = mysql_query("SELECT * FROM users");

    while($res = mysql_fetch_assoc($q)){
        $data = json_encode($res);  
    }

    return $data;
}


$data = get_chart_data();

echo $data;
gabrielcastillo
Junior Poster in Training
54 posts since Apr 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0

Actually, that should be:

function get_chart_data() {
    $q = mysql_query("SELECT * FROM users");
    while($res = mysql_fetch_assoc($q)){
        $data[] = $res;  
    }
    return json_encode($data);
}

$data = get_chart_data();
echo $data;
pritaeas
Posting Prodigy
Moderator
9,265 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,456
Skill Endorsements: 86

Thanks guys for the comments.

rotten69
Master Poster
747 posts since May 2011
Reputation Points: 36
Solved Threads: 47
Skill Endorsements: 11

Thanks for the correction MOD.. I originally had that as my function but I second guessed myself last min.

gabrielcastillo
Junior Poster in Training
54 posts since Apr 2012
Reputation Points: 0
Solved Threads: 5
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0943 seconds using 2.71MB