Why is not showing google pie chart on live server. But this code is perfect work on localhost and show pie chart but when i am uploading this code on server so that code is not working ...so please help me
<?php
$query = "SELECT attendence_status, count(*) as number FROM student_attendence where date between '$date1' AND '$date2' AND stu_id='$s_id' GROUP BY attendence_status";
$result = mysqli_query($con, $query);
?>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart()
{
var data = google.visualization.arrayToDataTable([
['attendence_status', 'Number'],
<?php
while($row = mysqli_fetch_array($result))
{
echo "['".$row["attendence_status"]."', ".$row["number"]."],";
}
?>
]);
var options = {
//is3D:true,
slices: {A: {color: 'Red'}, P:{color: 'Green'}, H:{color: 'Yellow'}, L: {color: 'Blue'}},
pieHole: 0.4
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
</script>
<center><div style="width:100%;">
<div id="piechart" style="width: 100%; height: 100%;"></div>
</div> </center>
<!--==============================END PIE Chart============-------->
</div>