Christopher Arndt schrieb:
> Example: assuming you pass "dict(chart_data=[30,20,50])" to the template
> from your controller, you could insert a nice google chart with the
> following template code:
>
> <img
> src="http://chart.apis.google.com/chart?chs=250x150&cht=p3&chd=t:${','.join(chart_data)}"
> />
Sorry, correctly that should be:
<img
src="http://chart.apis.google.com/chart?chs=250x150&cht=p3&chd=t:${','.join([str(i)
for i in chart_data])}" />
Just for fun, I have just built a little GoogleChart TG widget, to
create image links for Google charts very easily:
http://paste.turbogears.org/paste/6312
I have also build a very minimal TG 1.1 demo app, which showcases three
different charts created with this widget:
http://chrisarndt.de/files/GoogleChartDemo-1.0.tar.bz2
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---