[reportlab-users] Wedge labels overlapping in pie charts
Nizam Sayeed
ibnameen at gmail.com
Fri Oct 26 12:45:17 EDT 2007
On 10/26/07, Nizam Sayeed <ibnameen at gmail.com> wrote:
>
> On 10/26/07, Robin Becker <robin at reportlab.com> wrote:
> >
> > Nizam Sayeed wrote:
> > > Hello all,
> > >
> > > I wanted to know if there is a way to tweak the positions of wedge
> > labels on
> > > pie charts. I am generating some pie charts where the slices are quite
> > small
> > > and are back to back. Short of re-organizing the slice order based on
> > the
> > > size, is there a simple way to have reportlab space out the wedge
> > labels a
> > > bit so as to prevent any overlap? Sample chart is attached. Thanks.
> > >
> > > Best regards,
> > >
> > > Nizam Sayeed
> > .......
> > This is quite a hard problem. We have some possible solutions including
> >
> > 1) hand labelling (or adjusting the positions of labels by hand).
> > 2) set the chart.checkLabelOverlap attribute to 1 (this may help).
> > 3) change the slice ordering mode ie chart.orderMode = 'alternate' note
> > that
> > this last will certainly alter the way in which the slices are laid out
> > and it
> > may be more difficult to do the legends etc etc.
> > --
> > Robin Becker
> > _______________________________________________
> > reportlab-users mailing list
> > reportlab-users at reportlab.com
> > http://two.pairlist.net/mailman/listinfo/reportlab-users
> >
>
> Thanks Robin. I will try the first two suggestions and see what happens. I
> am already doing something similar to number 3. In my version, I alternate
> the slices (small,large,small,large...) using a custom method that I have
> which also returns colorNamePairs so that it can be fed to the legend.
>
> -- Nizam
I tried option 2 (checkLabelOverlap = 1) and this fixed it! Thanks again.
-- Nizam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20071026/b5ebc5eb/attachment.htm>
More information about the reportlab-users
mailing list