Hi all,
graph_object.render method does not encode the data_url properly, so if you try to call it like this :
g = graph_object()
g.render(500,500,"getData?p_service="+p_service+"&p_format=pie",root))
only the first paramter is took into account, the last one is lost in the rendered html code
[code]
<param name="movie" value="scripts/open-flash-chart.swf?width=500&height=500&data=getData%?p_service=domaine&p_format=bar" />
<embed src="scripts/open-flash-chart.swf?width=500&height=500&data=getData%?p_service=domaine&p_format=bar" ... />
[/code]
As you can see, your parameters are lost because they are passed as parameters for open-flash-chart.swf instead.
To fix this, one must use urllib.quote(data_url) to have the proper html rendering :
[code]
<param name="movie" value="scripts/open-flash-chart.swf?width=500&height=500&data=getData%3Fp_service%3Ddomaine%26p_format%3Dbar" />
<embed src="scripts/open-flash-chart.swf?width=500&height=500&data=getData%3Fp_service%3Ddomaine%26p_format%3Dbar"
[/code]
ChangeLog
2008-02-27 Chaouche yassine <yacinechaouche@yahoo.com>
* OpenFlashChart.py :
(graph_object.render):
Wrapped the data_url into urllib.quote() so that it wont be interpreted as a parameter to the swf object;
Patch for graph.render method