[reportlab-users] HorizontalLineChart background with white stripes

Helga Peters helga at full-control.nl
Tue Aug 6 05:57:41 EDT 2013


In the following document: "Documentation for package "reportlab.graphics"
Generated by: graphdocpy.py version 0.8; Date generated: 2013-05-07 20:19",
I found a nice example on page 135 with an image of what it should look
like.

However I can't reproduce the white stripes in the backgound.
I have added: lc.valueAxis.visibleGrid = 1,
then I get black stripes, but how can I change the color of those stripes ?
I have tried 'lc.categoryAxis.gridStrokeColor', but that doesn't seem to do
what I think it would do.

Code of example:
def sample1a():
drawing = Drawing(400, 200)
data = [
(13, 5, 20, 22, 37, 45, 19, 4),
(5, 20, 46, 38, 23, 21, 6, 14)
]
lc = SampleHorizontalLineChart()
lc.x = 50
lc.y = 50
lc.height = 125
lc.width = 300
lc.data = data
lc.joinedLines = 1
lc.strokeColor = colors.white
lc.fillColor = colors.HexColor(0xCCCCCC)
lc.lines.symbol = makeMarker('FilledDiamond')
lc.lineLabelFormat = '%2.0f'
catNames = 'Jan Feb Mar Apr May Jun Jul Aug'.split(' ')
lc.categoryAxis.categoryNames = catNames
lc.categoryAxis.labels.boxAnchor = 'n'
lc.valueAxis.valueMin = 0
lc.valueAxis.valueMax = 60
lc.valueAxis.valueStep = 15
drawing.add(lc)
return drawing

Thanks in advance,
Helga
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20130806/40fb395f/attachment.html>


More information about the reportlab-users mailing list