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)):
                        # 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]))
                                  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

>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]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to