我无法遍历我的列表对象arData = [] ['昨天',42,49],['今天',50,67],['Tommorro',57,63] ...] 显示图表。
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string','Day');
data.addColumn('number','Positive');
data.addColumn('number','Negative');
data.addRows([{{=arData}}]
);...
</script>
我也试过这个
function drawChart() {
var data = google.visualization.arrayToDataTable(
{{for row in arData:}}
{{arData[i]}}
{{pass}}
);
和
var data = google.visualization.arrayToDataTable({{=arData}});
变量i和arData来自函数dict return
请帮助和一些最好的实践