0

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
12
Views
5 Years
Discussion Span
Last Post by gabrielcastillo
0

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

Are they free to use?

0

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

0

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;

Edited by gabrielcastillo: spelling errors

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;
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.