[reportlab-users] BarChart - small value bar not displaying

Patrick Craston Patrick.Craston at contextis.co.uk
Fri Jul 5 07:52:50 EDT 2013


Setting the forceZero property of the valueAxis to True did the trick.

Thanks very much for your help!

-----Original Message-----
From: reportlab-users-bounces at lists2.reportlab.com [mailto:reportlab-users-bounces at lists2.reportlab.com] On Behalf Of Robin Becker
Sent: 05 July 2013 12:26
To: reportlab-users
Subject: Re: [reportlab-users] BarChart - small value bar not displaying

On 05/07/2013 11:41, Alberto Cabello Sánchez wrote:

> On Fri, Jul 05, 2013 at 10:58:44AM +0100, Patrick Craston wrote:

>> Hi reportlab users

>>

>> I've encountered a problem when displaying a HorizontalBarChart (same

>> issue for 3D and 2D versions).

>>

>> My data is [16, 43, 12, 1]

>> When I plot the chart it does not display the bar for the item with value 1.

>> See here: http://i.troll.ws/0c6877f6.png

>>

>> This is obviously a scaling issue but shouldn't it at least display a

>> narrow bar for that value (especially in the 3D version)?

>

> Actually, it is a range issue, not a scaling one.

>

> Vertical axis is placed where X=1 shoud be displayed, this is why that

> bar is not displayed.

>

Looking at the chart it's not clear exactly what the bottom value is, but I guess you're right and it is 1. If you add rangeRound = 'low' or forceZero attributes at the relevant place then the chart would look better. However, our recent project involved actual scaling where the height was so small it was drawn, but not visible. That problem's what the minDimen thing was aimed at.
--
Robin Becker
_______________________________________________
reportlab-users mailing list
reportlab-users at lists2.reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users


More information about the reportlab-users mailing list