you migh consider using HighCharts for this purpose. HighCharts can talk easily to any JSON interface, have a look here for examples: http://www.highcharts.com/documentation/how-to-use#live-charts
A sample Database call might work like this:
<?php mysql_connect("hostname", "user", "password"); mysql_select_db("mydb"); $result = mysql_query("select * from mytable"); $obj = mysql_fetch_object($result); mysql_free_result($result); echo json_decode($obj); ?>
This would return a valid JSON from the server, to which you can point your highcharts and build the charts. Good Luck!