Property set to range of y-axis?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ahmadgee
Posts: 3
Joined: Fri Feb 29, 2008 2:56 pm

Property set to range of y-axis?

Post by ahmadgee » Tue Mar 04, 2008 4:36 pm

Hi every body,

Let us suppose I have different values of prices in database as

10,140,1,0,30,230,490,30,300

but my requirement is that plot the bar graph with maximum y axis range 100.If the graph read the value greater that 100 then it must plot till 100.

My question is that
Is there any property to set the range of y-axis.

Thanks
Best regards

sri_krishni
Posts: 10
Joined: Thu Nov 15, 2007 10:36 pm

Post by sri_krishni » Tue Mar 04, 2008 9:16 pm

There is a method setRange(double, double) which would set the minimum and maximum values respectively. To achieve what you want, you may want to have one condition while you create your dataset which should check if the value is > 100 and should set the value as 100 if it is > 100.

Hope this helps..

Locked