How can I fill out this graph with MySQL data?
<?php
$sql = 'SELECT * FROM historicos';
$resultado = mysqli_query($conn, $sql);
?>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Horario', 'Sales'],
['2004', 0.500],
['2005', 0.1],
['2006', 0.200],
['2007', 0.30]
]);
var options = {
title: 'Company Performance',
curveType: 'function',
legend: { position: 'bottom' }
};
var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));
chart.draw(data, options);
}
</script>
After some adjustments worked .. ' function drawChart () { var data = google.visualization.arrayToDataTable ([ ['Schedule', 'Response time'], ]);
'