[reportlab-users] Making use of N/A feature in bargraphs

Robin Becker reportlab-users@reportlab.com
Thu, 14 Nov 2002 10:09:19 +0000


In article <LKENLBBMDHMKBECHIAIACEFMCOAA.andy@reportlab.com>, Andy
Robinson <andy@reportlab.com> writes
>Larry, thanks for the earlier docco patches which I will try to
>apply tomorrow.  Going from memory (I'll check for real if
>these don't work):
>>
>> 1) What data value will trigger the system to regard it as N/A data (zero
>> doesn't seem to work)?
>
>None
>
>> 2) What is proper syntax for setting the label to be printed when N/A data
>> is encountered?
>
for barlabels
1) The missing value is Python None
2) To get the nalabel to actually work
set the barchart's naLabel to an instance of NA_Label (from
textlabels.py). The NA_Label's text attribute (defaut n/a) is the value
used for the missing barlabel. The NA_Label is an extended BarChartLabel
so it also allows setting various adjustments eg whether a line is drawn
from the bar to the label etc etc.
-- 
Robin Becker