charts - web2py-how to convert a list object to a 2D array or render it in google.visualization.arrayToDataTable -


i can't iterate through list object ardata = [] has, ['yesterday', 42, 49], ['today', 50, 67], ['tommorro', 57, 63]...] display chart.

<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> 

i tried this

function drawchart() {     var data = google.visualization.arraytodatatable(     {{for row in ardata:}}             {{ardata[i]}}     {{pass}}     ); 

and

    var data = google.visualization.arraytodatatable({{=ardata}}); 

the variable , ardata function dict return

please , best pratice


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -