[reportlab-users] Can you change the color of the barLabels

Robin Becker reportlab-users@reportlab.com
Thu, 27 Mar 2003 08:22:11 +0000


In article <DB0613E4484BD511B0460002A56072B0069C8A23@MSGBOS671NTS.fmr.co
m>, Johnson, Patricia <Patricia.Johnson@FMR.COM> writes
>
>    Is there any way to change the color of the bar labels.  The 
>    default color is black but I'd like them to match the bar colors.
>
>    I've tried all of the following without success: 
>
>            hbc.barLabels.boxFillColor = colors.blue         
>            hbc.barLabels.boxStrokeColor = colors.blue 
>            hbc.barLabels[0].strokeColor = colors.blue       
>            hbc.barLabels.lineStrokeColor = colors.blue 
>            hbc.barLabels.fillColor = colors.blue 
>            hbc.barLabels.color = colors.blue 
>
>    Thanks all. 

This certainly changes the bar labels to red for me
        hbc = reportlab.graphics.charts.barcharts.HorizontalBarChart()
        hbc.y = 20
        hbc.barLabelFormat = "%d"
        hbc.barLabels.fillColor = red
        hbc.barLabels.boxAnchor = 'w'
        hbc.barLabels.dx = 3
-- 
Robin Becker