[reportlab-users] setProperties for LinePlot

Berthold Höllmann reportlab-users@reportlab.com
Mon, 28 Jul 2003 15:13:50 +0200


Hello,

I try to "setPropertie" for a linePlot. My problem is, how do I set
the properties for the individual lines? lp.getProperties() returns 

...
 'lines': <reportlab.graphics.widgetbase.TypedPropertyCollection instance at 0x4051fa4c>,
...

but 

lp.lines.setProperties({
        '[0].strokeDashArray': None,
        '[1].strokeDashArray': [2, 1],
        '[2].strokeDashArray': [1, 1]})

gives

Traceback (most recent call last):
  File "ESR.py", line 142, in ?
    d1 = demo1()
  File "ESR.py", line 110, in demo1
    lp.lines.setProperties({
  File "/usr/local/fitools/GLPy/linux/lib/python2.3/site-packages/reportlab/graphics/widgetbase.py", line 115, in setProperties
    child = getattr(self, childName)
  File "/usr/local/fitools/GLPy/linux/lib/python2.3/site-packages/reportlab/graphics/widgetbase.py", line 245, in __getattr__
    return getattr(self._value,name)
AttributeError: LinePlotProperties instance has no attribute '[0]'

Thanks for the Help
Berthold
-- 
Dipl.-Ing. Berthold Höllmann   __   Address:
hoel@GL-Group.com           G /  \ L Germanischer Lloyd
phone: +49-40-36149-7374    -+----+- Vorsetzen 32/35    P.O.Box 111606
fax  : +49-40-36149-7320      \__/   D-20459 Hamburg    D-20416 Hamburg