[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>
&nbsp; File &quot;test.py&quot;, line 11, in ?<br>
&nbsp;&nbsp;&nbsp; renderPM.drawToFile(y, 'test.jpg', 'JPG')<br>
&nbsp; File &quot;D:\PYTHON22\reportlab\graphics\renderPM.py&quot;, line
446, in drawToFile<br>
&nbsp;&nbsp;&nbsp; draw(d, c, 0, 0)<br>
&nbsp; File &quot;D:\PYTHON22\reportlab\graphics\renderPM.py&quot;, line
44, in draw<br>
&nbsp;&nbsp;&nbsp; R.draw(drawing, canvas, x, y)<br>
&nbsp; File &quot;D:\PYTHON22\reportlab\graphics\renderPM.py&quot;, line
91, in draw<br>
&nbsp;&nbsp;&nbsp; self.drawNode(drawing)<br>
&nbsp; File &quot;D:\PYTHON22\reportlab\graphics\renderPM.py&quot;, line
106, in drawNode<br>
&nbsp;&nbsp;&nbsp; self.drawNodeDispatcher(node)<br>
&nbsp; File &quot;D:\PYTHON22\reportlab\graphics\renderbase.py&quot;,
line 196, in drawNodeDisp<br>
atcher<br>
&nbsp;&nbsp;&nbsp; self.drawGroup(node)<br>
&nbsp; File &quot;D:\PYTHON22\reportlab\graphics\renderbase.py&quot;,
line 213, in drawGroup<br>
&nbsp;&nbsp;&nbsp; node2 =3D childNode.provideNode()<br>
&nbsp; File &quot;D:\PYTHON22\reportlab\graphics\widgetbase.py&quot;,
line 147, in provideNode<br>
&nbsp;&nbsp;&nbsp; return self.draw()<br>
&nbsp; File
&quot;D:\PYTHON22\reportlab\graphics\charts\barcharts.py&quot;, line 450,
in draw<br>
&nbsp;&nbsp;&nbsp; return self._drawFinish()<br>
&nbsp; File
&quot;D:\PYTHON22\reportlab\graphics\charts\barcharts.py&quot;, line 193,
in _drawF<br>
inish<br>
&nbsp;&nbsp;&nbsp; g.add(self.makeBars())<br>
&nbsp; File
&quot;D:\PYTHON22\reportlab\graphics\charts\barcharts.py&quot;, line 427,
in makeBa<br>
rs<br>
&nbsp;&nbsp;&nbsp;=20
self._addBarLabel(g,rowNo,colNo,x,y,width,height)<br>
&nbsp; File
&quot;D:\PYTHON22\reportlab\graphics\charts\barcharts.py&quot;, line 322,
in _addBa<br>
rLabel<br>
&nbsp;&nbsp;&nbsp; text =3D self._getLabelText(rowNo,colNo)<br>
&nbsp; File
&quot;D:\PYTHON22\reportlab\graphics\charts\barcharts.py&quot;, line 311,
in _getLa<br>
belText<br>
&nbsp;&nbsp;&nbsp; raise Exception, msg<br>
Exception: Unknown formatter type &lt;bound method AvgTTR._formatHour of
&lt;AvgTTR.A<br>
vgTTR instance at 0x0108CA90&gt;&gt;, 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>&nbsp;&nbsp;&nbsp;
self.bc.barLabelFormat =3D self._formatHour(self)</blockquote><br>
Try:<br><br>
&nbsp; 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--