Hi,
I am trying to build a dojox PieChart widget in tw2. I have got most
of the stuff working and the chart displays correctly with static
data. I have run into problems when I try to pass data (a python
dictionary) to the widget. I have successfully passed normal (string)
parameters to the widget.
In the widget class I have:
chart_data = twc.Param("Chart data", attribute=True)
In the mako template for the widget, I am using this data as:
${w.chart_data}
In the test code template, I am using:
<%! import tw2.dojox as dx %>
${dx.PieChart(id='regn_chart', width=600, height=600,
chart_data=c.chart_data).display()|n}
I know the usage is rough but right now I am concentrating on getting
the widget operational.
My question is can we pass python types (dictionaries, lists) to the
widget? If yes, how? It seems I am unable to pass data to the widget
correctly because the line:
${dx.PieChart(id='regn_chart', width=600, height=600,
chart_data=c.chart_data).display()|n}
gives me error saying:
TypeError: sequence item 11: expected string or Unicode, int found
Any clues on how to fix it are welcome.
Regards,
Kashif.
--
You received this message because you are subscribed to the Google Groups
"ToscaWidgets-discuss" 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/toscawidgets-discuss?hl=en.