I'm trying to build a filter chart with MySQL data.
This is one of the codes for this type of filter chart:
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script><scripttype='text/javascript'>google.charts.load('current',{'packages':['annotationchart']});google.charts.setOnLoadCallback(drawChart);functiondrawChart(){vardata=newgoogle.visualization.DataTable();data.addColumn('date','Date');data.addColumn('number','Consumo');data.addRows([[newDate(2314,2,15),12400],[newDate(2314,2,16),24045],[newDate(2314,2,17),35022],[newDate(2314,2,18),12284],[newDate(2314,2,19),8476],[newDate(2314,2,20),0]]);varchart=newgoogle.visualization.AnnotationChart(document.getElementById('chart_div'));varoptions={displayAnnotations:true};chart.draw(data,options);}</script></head><body><divid='chart_div'style='width:1000px;height:500px;'></div></body></html>
AnothergraphicalsoongooglechartsistheChartsRangeFilter(whichhasthesameprincipleasthatgraphabove).
Myquestionis:howtoaddtheMySQLdatatothischart?IcannotseethedatawhenIsetupmycode,IbelievetheproblemishowI'mhandlingthedatain"data.addRows".
Thank you!