[reportlab-users] BarChart barLabelCallout ?
Andy Robinson
reportlab-users@reportlab.com
Sun, 8 Dec 2002 03:44:07 -0000
> Hi,
>
> I found a new attribute in BarChart:
>
> barLabelCallOut = AttrMapValue(None, desc='Callout
> function(label)\nlabel._callOutInfo
> =
> (self,g,rowNo,colNo,x,y,width,height,x00,y00,x0,y0)'),
>
> Can anybody explain ?
>
I think this was in response to Pat Johnson's enquiry
that she wanted positive bars to be labelled e.g. '3.14'
in black text, and negaive ones to be e.g. '(3.14)' in
red text. Robin added a callback mechanism so you could
write your own function which drew a label, and thereby
permit radically different labels for positive and negative
amounts. It is not beautiful, but it's hard to see a better
way.
- Andy