I am using this code from internet. But in this the data is static but i want to draw a chart with my database entries. can u tell me how to add mysql data in this code
<div class="hellcontainer">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<dcript type="text/javascript">
google.load("visualization","1",{packages:["corechar"]});
google.setOnLoadCallback(drawChart);
function drawChart()
{
var data=google.visualization.arrayToDataTable([
['Languages','speakers(in millions)'],
['Assamese,13'],['Punjabi',45]]);
var options = {
title:''
};
var chart=new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data,options);
}
</script>
See Question&Answers more detail:os