Setting upper Margin

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Suprigya

Setting upper Margin

Post by Suprigya » Wed Dec 11, 2002 12:29 am

Hi,

I am using a lineChart and the y-Axis displays percentage. I have scaled the chart to use min as 0 and max as 100. If the value if 100%, it doesn't get displayed properly. Half of it is cut. Is there a way to increase the marigin a little?

If I use autoscaling, ->
using setUpperMargin(0.1), 110. Since it's a percent chart, I don't want 110 to be displayed

if I set min and max and use setUpperMargin method, it doesn't take affect.

Is there a way to increase the margin so that y-Axis scales only upto max value set i.e. 100 but upper margin is increased?

Thanks,
Suprigya

David Gilbert

Re: Setting upper Margin

Post by David Gilbert » Thu Dec 12, 2002 12:47 am

Hi Suprigya,

The margins are only added when the axis range is auto-calculated. If you set a manual range, no margins are applied...did you try setting the range to (0.0, 105.0)?

Regards,

DG

Suprigya

Re: Setting upper Margin

Post by Suprigya » Thu Dec 12, 2002 5:08 pm

Thanks David, setting the range solves the problem. Now, I can get the tick marks displayed just till 100 and it increases the margin also. This product ROCKS!!

Locked