[reportlab-users] BarLabelFormat
Marcus Vinicius Laranjeira
reportlab-users@reportlab.com
Fri, 26 Jul 2002 14:39:26 -0300
--=====================_8237712==.ALT
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable
Dinu,
I did exactely what you told me to, and this is wath happened:
Traceback (most recent call last):
File "test.py", line 11, in ?
renderPM.drawToFile(y, 'test.jpg', 'JPG')
File "D:\PYTHON22\reportlab\graphics\renderPM.py", line 446, in=
drawToFile
draw(d, c, 0, 0)
File "D:\PYTHON22\reportlab\graphics\renderPM.py", line 44, in draw
R.draw(drawing, canvas, x, y)
File "D:\PYTHON22\reportlab\graphics\renderPM.py", line 91, in draw
self.drawNode(drawing)
File "D:\PYTHON22\reportlab\graphics\renderPM.py", line 106, in drawNode
self.drawNodeDispatcher(node)
File "D:\PYTHON22\reportlab\graphics\renderbase.py", line 196, in=20
drawNodeDisp
atcher
self.drawGroup(node)
File "D:\PYTHON22\reportlab\graphics\renderbase.py", line 213, in=
drawGroup
node2 =3D childNode.provideNode()
File "D:\PYTHON22\reportlab\graphics\widgetbase.py", line 147, in=20
provideNode
return self.draw()
File "D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 450, in=
draw
return self._drawFinish()
File "D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 193, in=
=20
_drawF
inish
g.add(self.makeBars())
File "D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 427, in=
=20
makeBa
rs
self._addBarLabel(g,rowNo,colNo,x,y,width,height)
File "D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 322, in=
=20
_addBa
rLabel
text =3D self._getLabelText(rowNo,colNo)
File "D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 311, in=
=20
_getLa
belText
raise Exception, msg
Exception: Unknown formatter type <bound method AvgTTR._formatHour of=
<AvgTTR.A
vgTTR instance at 0x0108CA90>>, expected string or function
Why! ?!?!?!?!
At 18:25 26/07/02 +0200, you wrote:
>Marcus Vinicius Laranjeira:
>
>> self.bc.barLabelFormat =3D self._formatHour(self)
>
>Try:
>
> self.bc.barLabelFormat =3D self._formatHour
>
>Dinu
>
>_______________________________________________
>reportlab-users mailing list
>reportlab-users@reportlab.com
>http://two.pairlist.net/mailman/listinfo/reportlab-users
Marcus Vinicius Laranjeira
MON Center
Datacraft do Brasil - (http://www.datacraft.com.br)
R. Tenente Negr=E3o, 140 - 8o. Andar
Itaim Bibi - S=E3o Paulo - SP - 04530-030
Tel: +55-11-3053-0241
Fax: +55-11-3053-0220
--=====================_8237712==.ALT
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
Dinu,<br><br>
I did exactely what you told me to, and this is wath happened:<br><br>
Traceback (most recent call last):<br>
File "test.py", line 11, in ?<br>
renderPM.drawToFile(y, 'test.jpg', 'JPG')<br>
File "D:\PYTHON22\reportlab\graphics\renderPM.py", line
446, in drawToFile<br>
draw(d, c, 0, 0)<br>
File "D:\PYTHON22\reportlab\graphics\renderPM.py", line
44, in draw<br>
R.draw(drawing, canvas, x, y)<br>
File "D:\PYTHON22\reportlab\graphics\renderPM.py", line
91, in draw<br>
self.drawNode(drawing)<br>
File "D:\PYTHON22\reportlab\graphics\renderPM.py", line
106, in drawNode<br>
self.drawNodeDispatcher(node)<br>
File "D:\PYTHON22\reportlab\graphics\renderbase.py",
line 196, in drawNodeDisp<br>
atcher<br>
self.drawGroup(node)<br>
File "D:\PYTHON22\reportlab\graphics\renderbase.py",
line 213, in drawGroup<br>
node2 =3D childNode.provideNode()<br>
File "D:\PYTHON22\reportlab\graphics\widgetbase.py",
line 147, in provideNode<br>
return self.draw()<br>
File
"D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 450,
in draw<br>
return self._drawFinish()<br>
File
"D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 193,
in _drawF<br>
inish<br>
g.add(self.makeBars())<br>
File
"D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 427,
in makeBa<br>
rs<br>
=20
self._addBarLabel(g,rowNo,colNo,x,y,width,height)<br>
File
"D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 322,
in _addBa<br>
rLabel<br>
text =3D self._getLabelText(rowNo,colNo)<br>
File
"D:\PYTHON22\reportlab\graphics\charts\barcharts.py", line 311,
in _getLa<br>
belText<br>
raise Exception, msg<br>
Exception: Unknown formatter type <bound method AvgTTR._formatHour of
<AvgTTR.A<br>
vgTTR instance at 0x0108CA90>>, expected string or
function<br><br>
<br>
Why! ?!?!?!?!<br><br>
At 18:25 26/07/02 +0200, you wrote:<br>
<blockquote type=3Dcite class=3Dcite cite>Marcus Vinicius
Laranjeira:<br><br>
<blockquote type=3Dcite class=3Dcite cite>
self.bc.barLabelFormat =3D self._formatHour(self)</blockquote><br>
Try:<br><br>
self.bc.barLabelFormat =3D self._formatHour<br><br>
Dinu<br><br>
_______________________________________________<br>
reportlab-users mailing list<br>
reportlab-users@reportlab.com<br>
<a href=3D"http://two.pairlist.net/mailman/listinfo/reportlab-users"=
eudora=3D"autourl">http://two.pairlist.net/mailman/listinfo/reportlab-users=
</a><br>
</blockquote>
<x-sigsep><p></x-sigsep>
<font face=3D"Courier New, Courier"><br><br>
<br>
Marcus Vinicius Laranjeira<br>
MON Center <br><br>
Datacraft do Brasil -
(<a href=3D"http://www.datacraft.com.br/" eudora=3D"autourl">http://www.data=
craft.com.br</a>)
<br>
R. Tenente Negr=E3o, 140 - 8o. Andar <br>
Itaim Bibi - S=E3o Paulo - SP - 04530-030 <br>
Tel: +55-11-3053-0241<br>
Fax: +55-11-3053-0220</font></html>
--=====================_8237712==.ALT--