[reportlab-users] problem with missing Times-Roman font

Mark Zitnik mark.zitnik at gmail.com
Wed Dec 24 04:34:17 EST 2008


Hi All,

i have installed successfully reportlab on ubunto and tried to create
VerticalBarChart

but i'am missing Can't setFont(Times-Roman) missing the T1 files? and i can
not find it.

Please help.

the code

# code to produce the above chart
from reportlab.graphics.shapes import Drawing
from reportlab.lib import colors
from reportlab.graphics.charts.barcharts import VerticalBarChart
drawing = Drawing(400, 200)
data = [
(13, 5, 20, 22, 37, 45, 19, 4),
(14, 6, 21, 23, 38, 46, 20, 5)
]
bc = VerticalBarChart()
#bc.setFont('Helvetica', 30)
bc.x = 50
bc.y = 50
bc.height = 125
bc.width = 300
bc.data = data
bc.strokeColor = colors.black
bc.valueAxis.valueMin = 0
bc.valueAxis.valueMax = 50
bc.valueAxis.valueStep = 10
bc.categoryAxis.labels.boxAnchor = 'ne'
bc.categoryAxis.labels.dx = 8
bc.categoryAxis.labels.dy = -2
bc.categoryAxis.labels.angle = 30
bc.categoryAxis.categoryNames = ['Jan-99','Feb-99','Mar-99',
'Apr-99','May-99','Jun-99','Jul-99','Aug-99']
drawing.add(bc)


drawing.save(formats=['gif'])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20081224/3d37e0cc/attachment.html>


More information about the reportlab-users mailing list