[["V1","V2","V3","V4","V5"],
[21,18.5,630.96,18.5,21],
[21,18.5,631.56,18.5,21],
[21,18.5,632.13,18.5,21],
[21,18.5,632.75,18.5,21],
[21,18.5,633.3,18.5,21],
[21,18.5,633.94,18.5,21],
[21,18.5,634.49,18.5,21],
[21,18.5,635.12,18.5,21],
[21,18.5,625.6,18.5,21]]<html>
<head>
<title>Test chart</title>
<!-- Load jQuery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {packages: ['corechart', 'line']});
google.charts.setOnLoadCallback(drawCurveTypes);
function drawCurveTypes() {
var jsonData = $.getJSON("data.php");
var obj = JSON.stringify(jsonData);
var data = google.visualization.arrayToDataTable(obj);
var options = {
hAxis: {
title: 'Time'
},
vAxis: {
title: 'Values'
},
series: {
1: {curveType: 'function'}
}
};
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="chart_div"></div>
</body>
</html>Uncaught Error: Not an array
at gvjs_zba (jsapi_compiled_default_module.js:81)
at Object.gvjs_sm [as arrayToDataTable] (jsapi_compiled_default_module.js:83)
at drawCurveTypes (view.php:14)
at Object.google.a.c.xc (loader.js:152)
at Object.google.a.c.Oa (loader.js:152)
at f (loader.js:149)
at Object.google.l.m.kj (loader.js:229)
at Object.google.l.m.ce (loader.js:229)
at loader.js:228--
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+unsub...@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/71314d71-2daa-4569-a365-c44b4e43a7e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.