how to create bar chart for zero or above value

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
jawednazarali
Posts: 6
Joined: Wed Feb 14, 2007 8:49 am

how to create bar chart for zero or above value

Post by jawednazarali » Mon Feb 26, 2007 4:06 pm

I want to generate a bar chart that should only show zero or above values.

What happening now is that if all values for bars are zero it show them in the middle of the chart. I want these bars at the bottom. As I am not going to have any negative value but I can have all zero values.

how to do this how to set the orientation at the bottom(for Vertical) and or left (for horizontal)

thanks
Jawed Ali
http://www.jawed.info

Software is Harder than it sounds.

Tom
Posts: 32
Joined: Mon Dec 11, 2006 2:50 pm

Post by Tom » Tue Feb 27, 2007 10:26 am

I think you can try to set the autorange of the range axis off.

axis.setAutoRange(false)

and specify the range that is used yourself. That could help because the axis istn't determining the range by itself anymore.

Tom

Tom
Posts: 32
Joined: Mon Dec 11, 2006 2:50 pm

Post by Tom » Tue Feb 27, 2007 10:30 am

i think its working with this

axis.setRangeType(RangeType.POSITIVE);

Tom
Posts: 32
Joined: Mon Dec 11, 2006 2:50 pm

Post by Tom » Tue Feb 27, 2007 10:31 am

i think its working with this

axis.setRangeType(RangeType.POSITIVE);

Locked