[reportlab-users] Pie chart, change startAngle

Helga Peters helga at full-control.nl
Tue Jul 2 08:09:47 EDT 2013


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.htm>


More information about the reportlab-users mailing list