Flot Pie Chart using Ajax, Php and MySql

Posted by Neriza Almirol on Stack Overflow See other posts from Stack Overflow or by Neriza Almirol
Published on 2013-10-30T03:52:07Z Indexed on 2013/10/30 3:53 UTC
Read the original article Hit count: 555

Filed under:
|
|

Good Day!

Can you help me? I have a problem getting values from database. I want to control the legend. I've been googling the best approach for the pie chart, but still looking for the best answer for my problem.

It's easy to query the data from the database, but I want to show it using the flot pie chart and I need it for statistic reports.

From database, I need to get the percentage of Female and Male followers and separate it according to age groups. The data (dateOfbirth) is available from our database using facebook integration. Can you give me an example using Ajax, Php and MySql? Thank you! :)

$.plot($("#graph_3"), graphData, {
                series: {
                    pie: {
                        show: true
                    }
                },
                grid: {
                    hoverable: true,
                    clickable: true
                }
            });
            $("#graph_3").bind("plothover", pieHover);
            $("#graph_3").bind("plotclick", pieClick);

enter image description here

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql