[Zope] ZGDChart
hi there, a great product, just i want to have a form to enter some parameters for the SQL Method call. since zgdchart-product calls the SQL Method i don't know how to pass the parameters. does anybody has an idea? thanks olaf -- soli-con Engineering Zanger Dipl.-Ing. (FH) Olaf Marc Zanger Lorrainestrasse 23 3013 Bern / Switzerland Fon: +41-31-332 9782 Mob: +41-76-572 9782 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.soli-con.com begin:vcard n:Zanger;Olaf Marc tel;cell:+41-76-572 9782 tel;work:+41-31-332 9782 x-mozilla-html:FALSE url:www.soli-con.com org:soli-con Engineering Zanger adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland version:2.1 email;internet:[EMAIL PROTECTED] title:Dipl.-Ing. note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A x-mozilla-cpt:;-32176 fn:Olaf Zanger end:vcard
RE: [Zope] ZGDChart product...
Hello. The function _chartdata in ZGDchart.py returns only one label column and one data column. You may want to change this to: * def _chartdata(self): """ return the first and second columns of sql query results as a pair of tuples """ rows = getattr(self, self.SQL)() # data[0] is list of labels data = [] start = 0 for row in rows: # each row is a list of fields # initialize empty lists for each column if start == 0: start = 1 for i in range(len(row)): data.append([]) # # Only insert rows with zero values if # it is not a pie chart # Pie Chart only makes sense with 1 data column # for i in range(len(row)): if (self.REQUEST['zgdchart_runtime_type'] != GDC_3DPIE and self.REQUEST['zgdchart_runtime_type'] != GDC_2DPIE) or row[1] != 0: # # Coerce the first field into a string # and other fields into a float # if i == 0: data[i].append( str (row[i])) else: data[i].append( float(row[i])) # # convert lists to tuples # apparently, gdchart.chart() accepts lists # as well, but I better check with # M Steed first. # # I just tried. return data *** and restart Zope, which worked for me. Andreas Furbach ___ EDS Informationstechnologie und Service GmbH Semerteichstr. 50-52 D-44141 Dortmund Tel.: 0231 / 944-1533 mailto: [EMAIL PROTECTED] >Hi. > >This is really a great product. > >Unfortunately, I'm not able to create a chart with multiple columns using a >ZSQL Data Method. >Multiple columns with a DTML-Method works fine. > >Do I miss something. Any ideas? > >Thanks for any help. Regards, Marc Ludwig ([EMAIL PROTECTED]) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZGDChart product...
Hi. This is really a great product. Unfortunately, I'm not able to create a chart with multiple columns using a ZSQL Data Method. Multiple columns with a DTML-Method works fine. Do I miss something. Any ideas? Thanks for any help. Regards, Marc Ludwig ([EMAIL PROTECTED]) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZGDChart/GDChart on Linux
Hmmm... I don't remember anymore how to build GDChart on Linux. To simplify the situation, let us say that we want to focus on GDChart alone, not ZGDChart. I downloaded from http://athani.pair.com/msteed/software/gdchart/index.html and did the "make -f makepy.linux" thing. But when I opened a Python interpreter, it says: >>>import gdchart Traceback (innermost last): File "", line 1, in ? ImportError: ./gdchart.so: undefined symbol: gdImagePng I have suceeded (don't remember how) to get passed this error, but then I get something similar for gdImageJpeg. Has anyone succeeded in installing gdchart module on Linux? (I thought I was successful once!) regards, Hung Jung _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )