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.

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

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

Member Avatar for iamthwee

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

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

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

Are they free to use?

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

Yeah, Thanks to all of you sharing links.

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;

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;

Thanks guys for the comments.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.