[Zope] Solution: how to pass variables into ZGDChart - Errata

Jaroslav Lukesh lsh at wo.cz
Wed May 17 13:23:11 EDT 2006


I am very sorry, I was past code from old notepad window :o)

 

So here are right DTML document from where we calling image:

 

<dtml-if users_id>

<dtml-elif user_id>

    <dtml-call "REQUEST.set('users_id', [])">

    <dtml-call "users_id.append(user_id)">

</dtml-if>

 

<dtml-call "REQUEST.set('temp_labels', [])">

<dtml-call "REQUEST.set('temp_data1',  [])">

<dtml-call "REQUEST.set('temp_data2',  [])">

 

<dtml-in ZSQL_query>

    <dtml-call "temp_labels.append(_.str(month) + ' ' + _.str(year))">

    <dtml-call "temp_data1.append(_.str((time1 or 0.00) / _.len(users_id))
)">

    <dtml-call "temp_data2.append(_.str((time2 or 0.00) / _.len(users_id))
)">

</dtml-in>

 

<img src="ZGDChart_graph?data0=<dtml-var "_.string.join(temp_labels, ',')
">&data1=<dtml-var "_.string.join(temp_data1, ',') ">&data2=<dtml-var
"_.string.join(temp_data2, ',') ">">

 

Best Regards, JL.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060517/5d8cfd70/attachment-0001.htm


More information about the Zope mailing list