20.01.2013 Views

ReportLab Graphics and SVG Integratation

ReportLab Graphics and SVG Integratation

ReportLab Graphics and SVG Integratation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

portLab<br />

epor ReportL<br />

portLa<br />

from reportlab.graphics.charts.barcharts \<br />

portLa<br />

Widget sample: bar chart cont'd<br />

Repor Rep<br />

import VerticalBarChart<br />

portL Repor<br />

bc = VerticalBarChart()<br />

bc.x, bc.y = 0, 0<br />

bc.height, bc.width = 250, 500<br />

# bc.barWidth = 20<br />

# bc.barSpacing = 3<br />

# bc.groupSpacing = 10<br />

bc.data = data<br />

bc.strokeColor = None<br />

bc.barLabelFormat = '%d'<br />

bc.barLabels.nudge = 10<br />

bc.categoryAxis.categoryNames = cats<br />

# bc.categoryAxis.labels.boxAnchor = 'n'

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!