Hi,

It is easy, no json, no plugin.

Pass the query results to the view
return dict(projects=projects)

Copy the snippet in the view.
https://google-developers.appspot.com/chart/interactive/docs/quick_start

replace this part

        data.addRows([
          ['Mushrooms', 3],
          ['Onions', 1],
          ['Olives', 1],
          ['Zucchini', 1],
          ['Pepperoni', 2]
        ]);

with this part

      data.addRows(7);

      {{for k,project in enumerate(projects):}}
        data.setCell({{=k}}, 0, '{{= project.name}}');
        data.setCell({{=k}}, 1, {{=project.value}});
      {{pass}}

Enjoy ,

Ashraf

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to