[reportlab-users] Bug in reportlab horizontal/vertical bar
chart modules ????
Marcus Vinicius Laranjeira
reportlab-users@reportlab.com
Mon, 15 Jul 2002 17:01:06 -0300
--=====================_7082364==.ALT
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable
Andy, Robin,
I am glad that I found a bug in your code, mainly because in the future we=
=20
may have some other people with the same problem...
I am in a hurry, but I can wait if you are busy, I just don't want to=20
bother your work for your customers...
Anyway, I will download the file that Andy made available and I will give=20
you a feedback on this as soon as I try it !
Thanks a lot,
Cheers,
Marcus
At 19:42 15/07/02 +0100, you wrote:
>In article <5.1.1.6.0.20020715102126.009d14a0@imap.datacraft.com.br>,=20
>Marcus Vinicius Laranjeira <m.laranjeira@datacraft.com.br>
>writes
> > Robin, folks,
> >
> > I really need help on this... Please help me solve this problem...
> >
> > I really appreciate !
> >
> > Cheers,
> >
> > Marcus
> >
>.....
>OK I found the problem, the barchart class likes colours in the categories=
=20
>to be different so you had to define lot's of zero
>values to
>get the different colors. The archart was stupid about removing collapsed=
=20
>rectangles and that excites a problem in the PM
>renderer's base library that causes the stupid thing to fall over when=20
>doing lot's of zero width/height rectangles.
>
>I fixed this in the base library by eliminating the zero data in the=20
>barchart makeBars function at line 420 it now says
>
> elif abs(width)>1e-7 and abs(height)>=3D1e-7 and=20
> (rowStyle.fillColor is not None or rowStyle.strokeColor is not None):
> r =3D Rect(x, y, width, height)
> r.strokeWidth =3D rowStyle.strokeWidth ## added line - now=
=20
> actually uses strokeWidth
> r.fillColor =3D rowStyle.fillColor
> r.strokeColor =3D rowStyle.strokeColor
> g.add(r)
>
>I will have a think on what to do about the general problem
>--
>Robin Becker
>_______________________________________________
>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
--=====================_7082364==.ALT
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
Andy, Robin,<br><br>
I am glad that I found a bug in your code, mainly because in the future
we may have some other people with the same problem... <br>
I am in a hurry, but I can wait if you are busy, I just don't want to
bother your work for your customers...<br><br>
Anyway, I will download the file that Andy made available and I will give
you a feedback on this as soon as I try it !<br><br>
Thanks a lot,<br><br>
Cheers,<br><br>
Marcus<br><br>
At 19:42 15/07/02 +0100, you wrote:<br>
<blockquote type=3Dcite class=3Dcite cite>In article
<5.1.1.6.0.20020715102126.009d14a0@imap.datacraft.com.br>, Marcus
Vinicius Laranjeira <m.laranjeira@datacraft.com.br><br>
writes<br>
> Robin, folks,<br>
><br>
> I really need help on this... Please help me solve
this problem...<br>
><br>
> I really appreciate !<br>
><br>
> Cheers,<br>
><br>
> Marcus<br>
><br>
.....<br>
OK I found the problem, the barchart class likes colours in the
categories to be different so you had to define lot's of zero<br>
values to<br>
get the different colors. The archart was stupid about removing collapsed
rectangles and that excites a problem in the PM<br>
renderer's base library that causes the stupid thing to fall over when
doing lot's of zero width/height rectangles.<br><br>
I fixed this in the base library by eliminating the zero data in the
barchart makeBars function at line 420 it now says<br><br>
elif abs(width)>1e-7 and
abs(height)>=3D1e-7 and (rowStyle.fillColor is not None or
rowStyle.strokeColor is not None):<br>
&nbs=
p;
r =3D Rect(x, y, width, height)<br>
&nbs=
p;
r.strokeWidth =3D rowStyle.strokeWidth ## added line - now actually uses
strokeWidth<br>
&nbs=
p;
r.fillColor =3D rowStyle.fillColor<br>
&nbs=
p;
r.strokeColor =3D rowStyle.strokeColor<br>
&nbs=
p;
g.add(r)<br><br>
I will have a think on what to do about the general problem<br>
-- <br>
Robin Becker<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></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>
--=====================_7082364==.ALT--