[reportlab-users] y axis lines and frames

Timothy Smith timothy at open-networks.net
Fri Aug 26 04:50:35 EDT 2005


Robin Becker wrote:

> Timothy Smith wrote:
>
>> 2 questions.
>> 1. when i use frames, if border=0 is set on the frame, and if the 
>> element of the frame are larger then it, then nothing appears on the 
>> canvas.
>
>
> not sure what this means; can you post an example?
>
        Doc = canvas.Canvas(PDFName)
   
 
        #items table       
        ItemsTable = Table([['Week', 'Category', 'Comment', 'Score'], 
['1', 'Volume of music', 'There was a great mix all around the venue', 
'4'], ['1', 'On arrival', 'Yes, I felt very welcomed and met the 
manager', '5'], ['1', 'Visual entertainment', 'Yes but not a great 
variety', '3'], ['1', 'Table cleanliness', 'Glasses were cleared but 
tables not wiped', '2'], ['1', 'Room', 'Very clean, cleaned regularly', 
'5'], ['1', 'Speed of Service', 'Waited 3-5 mintues but was 
aknowledged', '3'], ['1', 'Toilets', 'Very clean at all times', '4'], 
['1', 'Wait/floor staff', "They were not rude, smiled but didn't talk", 
'2'], ['1', 'Atmosphere', 'The music was good but the room lacked 
atmosphere', '5'], ['1', 'Friendly bar staff', 'Were having fun but were 
not smiling when serving', '2'], ['2', 'Room', 'Very clean, cleaned 
regularly', '5'], ['2', 'Speed of Service', 'Was served very quickly', 
'4'], ['2', 'Friendly bar staff', 'Very friendly, happy, having fun, 
very confident', '4'], ['2', 'On arrival', 'Yes, I felt very welcomed 
and met the manager', '5'], ['2', 'Visual entertainment', 'Yes but not a 
great variety', '3'], ['2', 'Table cleanliness', 'Cleaned very regularly 
- very clean', '4'], ['2', 'Toilets', 'Very clean at all times', '4'], 
['2', 'Wait/floor staff', 'Were very courteous, friendly and made 
conversations', '7'], ['2', 'Atmosphere', 'The music was good but the 
room lacked atmosphere', '5'], ['2', 'Volume of music', 'There was a 
great mix all around the venue', '4'], ['3', 'Volume of music', 'There 
was a great mix all around the venue', '4'], ['3', 'Friendly bar staff', 
'Very friendly, happy, having fun, very confident', '4'], ['3', 'On 
arrival', 'Yes, I felt very welcomed and met the manager', '5'], ['3', 
'Visual entertainment', 'Yes they were very entertaining', '4'], ['3', 
'Table cleanliness', 'Cleaned very regularly - very clean', '4'], ['3', 
'Room', 'Very clean, cleaned regularly', '5'], ['3', 'Toilets', 'Very 
clean at all times', '4'], ['3', 'Wait/floor staff', 'Were quite polite 
and happy', '5'], ['3', 'Atmosphere', 'The whole room felt great, 
everyone seemed to be having fun', '8'], ['3', 'Speed of Service', 'Was 
served very quickly', '4']]
, None, None)
       
        ItemsTable.setStyle(ReportStyle)
      
        fItemsTable = Frame(2*cm, 0*cm, 12*cm, 5*cm, showBoundary=0)
      
        fItemsTable.addFromList([ItemsTable],Doc)
       
        Doc.save()

If i set showBoundary=1 it doesn't have a problem. it doesn't seem to 
handle more then one page or having a flowable inside the frame larger 
then itself (without the boundary showing.

>> 2. is it possible to have lines running horizontally out from the 
>> yaxis to show where points on the graph intersect values on the y axis
>
>
> visibleGrid=1 may be what you want

visibleGrid is kind of right, but i need it to show on the y axis, for a 
horizontal line chart it shows from the x axis.

Chart.categoryAxis.visibleGrid = 1  << need to set that but for the y 
axis only



More information about the reportlab-users mailing list