im developing a chart that show the price evolution over time. When i was developing in my local server i could use a php while inside de script.. but after deployment for online server it no longer works.
the code i have now is: <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('date', 'Team'); data.addColumn('value', 'Season Start Date'); data.addRows( <?php echo $dados;?> ]); var options = { 'backgroundColor': 'transparent', 'curveType': 'function', 'is3D':true }; var chart = new google.visualization.LineChart(document.getElementById('curve_chart')); chart.draw(data, options); } </script> notice that the output from my $dados is: [2018-09-06, 2.00],[2018-09-07, 2.00],[2018-09-07, 2.10],[2018-09-08, 2.00],[2018-09-12, 2.95],[2018-09-12, 2.00],[2018-09-13, 2.10],[2018-09-13, 2.10],[2018-10-04, 2.10],[2018-10-04, 2.10],[2018-10-04, 2.10], but still no idea why it isn't working... help please!! -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/42a62ebd-ee3f-48d6-815f-b910140c9a96%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.