[reportlab-users] Line chart x-axis
Andy Robinson
andy at reportlab.com
Wed Jun 7 12:40:34 EDT 2006
Steve Bowsher wrote:
> Hi,
>
> I'm trying to create a line chart where the x (horizontal) axis
> intersects the y-axis at it's lowest value. The chart might contain
> negative values.
>
> Is there attribute change that will enable this to happen?
>
Hi Steve,
Assuming it's a horizontalLineChart, use:
chart.categoryAxis.joinAxisMode = 'bottom'
Some charts have two value axes so the 'categoryAxis' will be called
something else, but each axis has a joinAxisMode.
If you want to do anything more fancy here are all the ways you can join
axes. Allowed values are: 'bottom'; 'top'; 'value' or 'points'
If you set it to 'value', then 'joinAxisPos' attribute will specify a
y-value in real world units (e.g. pounds, growth rates or whatever).
If you set it to 'points' then 'joinAxisPos' can be used to specify that
it joins e.g. [50] points above the bottom of the chart bounding box.
Hope this helps,
Andy Robinson
More information about the reportlab-users
mailing list