[reportlab-users] reportlab-users Digest, Vol 114, Issue 1

Helga Peters helga at full-control.nl
Wed Jul 3 03:49:17 EDT 2013


Dear Andy,

Thank you for your quick answer and the solution. That does the trick!
Thanks for your clear explanation about the doughnut chart, I'll use the
pie chart instead.

Regards,
Helga



2013/7/2 <reportlab-users-request at lists2.reportlab.com>


> Send reportlab-users mailing list submissions to

> reportlab-users at lists2.reportlab.com

>

> To subscribe or unsubscribe via the World Wide Web, visit

> http://two.pairlist.net/mailman/listinfo/reportlab-users

> or, via email, send a message with subject or body 'help' to

> reportlab-users-request at lists2.reportlab.com

>

> You can reach the person managing the list at

> reportlab-users-owner at lists2.reportlab.com

>

> When replying, please edit your Subject line so it is more specific

> than "Re: Contents of reportlab-users digest..."

>

>

> Today's Topics:

>

> 1. Pie chart, change startAngle (Helga Peters)

> 2. Re: Pie chart, change startAngle (Andy Robinson)

>

>

> ----------------------------------------------------------------------

>

> Message: 1

> Date: Tue, 2 Jul 2013 14:09:47 +0200

> From: Helga Peters <helga at full-control.nl>

> Subject: [reportlab-users] Pie chart, change startAngle

> To: reportlab-users at lists2.reportlab.com

> Message-ID:

> <CALA9yC1Wo_16pjX3g=A4dHyUy9HVDC=bEQ5=

> cZaXZ_njVp1ahw at mail.gmail.com>

> Content-Type: text/plain; charset="iso-8859-1"

>

> I am working on a report including pie charts. Currently the first slice of

> the chart starts on 'East' (default), but I would like it to start at

> 'North'. I have been searching in the documentation and found : 'startAngle

> = 90', but it doesn't seem to work.

> Tested startAngle out with a Doughnut Charts and then it does work, so I am

> overlooking something. Any suggestions ?

> Below my code.

>

> drawing = Drawing(400,200)

> pc = Pie()

> pc.x = 125

> pc.y = 0

> pc.width = 200

> pc.height = 200

> pc.data = [433,760,1520,46806]

> pc.labels = ['Sms', 'Calls', 'Internet','Unused bundle']

> pc.startAngle = 90

> pc.sideLabels = 1

> pc.checkLabelOverlap = 1

>

> pc.simpleLabels = 0

> pc.slices.popout = 20

> pc.slices.strokeWidth = 1

> pc.slices.labelRadius = 1.25

>

> drawing.add(pc)

>

> Thanks in advange,

> Helga

> -------------- next part --------------

> An HTML attachment was scrubbed...

> URL: <

> http://two.pairlist.net/pipermail/reportlab-users/attachments/20130702/68c400d7/attachment-0001.htm

> >

>

> ------------------------------

>

> Message: 2

> Date: Tue, 2 Jul 2013 13:15:52 +0100

> From: Andy Robinson <andy at reportlab.com>

> Subject: Re: [reportlab-users] Pie chart, change startAngle

> To: reportlab-users <reportlab-users at lists2.reportlab.com>

> Message-ID:

> <CABjtAptbAfcdPd7gqCswNKpU-gN0W_qSgv+X7=

> Cmh8W5tjFh3Q at mail.gmail.com>

> Content-Type: text/plain; charset=UTF-8

>

> It cannot work with sideLabels=1. sideLabels=1 tells the system to

> automatically work out the best start angle so that most of the slices

> are at the sides, rather than at the top or bottom, so that horizontal

> labels are spaced better.

>

> By the way, DoughnutCharts are somewhat incomplete and broken. They

> are designed to do multiple nested doughnuts with multiple series, and

> many of the label properties make no sense in that context. We

> recently added an 'innerRadiusFraction' property to PieChart which

> does the same thing - for example, set it to 0.75 and you will get a

> fairly thin doughnut with 75% of the radius being the 'hole'. This

> does with with sidelabels.

>

> Hope this helps,

>

>

>

> On 2 July 2013 13:09, Helga Peters <helga at full-control.nl> wrote:

> > I am working on a report including pie charts. Currently the first slice

> of

> > the chart starts on 'East' (default), but I would like it to start at

> > 'North'. I have been searching in the documentation and found :

> 'startAngle

> > = 90', but it doesn't seem to work.

> > Tested startAngle out with a Doughnut Charts and then it does work, so I

> am

> > overlooking something. Any suggestions ?

> > Below my code.

> >

> > drawing = Drawing(400,200)

> > pc = Pie()

> > pc.x = 125

> > pc.y = 0

> > pc.width = 200

> > pc.height = 200

> > pc.data = [433,760,1520,46806]

> > pc.labels = ['Sms', 'Calls', 'Internet','Unused bundle']

> > pc.startAngle = 90

> > pc.sideLabels = 1

> > pc.checkLabelOverlap = 1

> >

> > pc.simpleLabels = 0

> > pc.slices.popout = 20

> > pc.slices.strokeWidth = 1

> > pc.slices.labelRadius = 1.25

> >

> > drawing.add(pc)

> >

> > Thanks in advange,

> > Helga

> >

> > _______________________________________________

> > reportlab-users mailing list

> > reportlab-users at lists2.reportlab.com

> > http://two.pairlist.net/mailman/listinfo/reportlab-users

> >

>

>

>

> --

> Andy Robinson

> Managing Director

> ReportLab Europe Ltd.

> Thornton House, Thornton Road, Wimbledon, London SW19 4NG, UK

> Tel +44-20-8405-6420

>

>

> ------------------------------

>

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at lists2.reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users

>

>

> End of reportlab-users Digest, Vol 114, Issue 1

> ***********************************************

>




--
Met vriendelijke groet,
Helga Peters
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20130703/45b0d492/attachment.html>


More information about the reportlab-users mailing list