net.comrom.chart
Class Scale

java.lang.Object
  extended bynet.comrom.chart.Scale
Direct Known Subclasses:
LogScale

public class Scale
extends java.lang.Object

The scale converts the data to screen coordinates.
Most charts have two scales, one per axis.
Example:
// create axis
Axis XAxis=new Axis(Axis.HORIZONTAL,new Scale());
Axis YAxis=new Axis(Axis.VERTICAL,new Scale());
XAxis.scale.min=0;
XAxis.scale.max=7;
YAxis.scale.min=0;
YAxis.scale.max=7;
If the min and max properties are not specified, Chart will calculate them from the DataSeries


Field Summary
 boolean exactMaxValue
          if true, Chart will calculate the max value of the scale using the preferred min/max values list default value is true for Y axis and false for X axis.
 boolean exactMinValue
           
 double max
          maximum value of the scale.
 double min
          minimum value of the scale.
 double[] preferred_MaxMin_values
          sorted list of preferred values for minimum and maximum values.
 boolean reverse
           
 int screenMax
          maximum value of scale on the screen.
 int screenMaxMargin
           
 int screenMin
           
 
Constructor Summary
Scale()
           
Scale(int ma, int mi)
           
 
Method Summary
 int getScreenCoord(double v)
           
 double getValue(int c)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exactMaxValue

public boolean exactMaxValue
if true, Chart will calculate the max value of the scale using the preferred min/max values list default value is true for Y axis and false for X axis.


exactMinValue

public boolean exactMinValue

preferred_MaxMin_values

public double[] preferred_MaxMin_values
sorted list of preferred values for minimum and maximum values.


max

public double max
maximum value of the scale.


min

public double min
minimum value of the scale.


screenMax

public int screenMax
maximum value of scale on the screen.


screenMaxMargin

public int screenMaxMargin

screenMin

public int screenMin

reverse

public boolean reverse
Constructor Detail

Scale

public Scale()

Scale

public Scale(int ma,
             int mi)
Parameters:
ma -
Method Detail

getScreenCoord

public int getScreenCoord(double v)

getValue

public double getValue(int c)
Parameters:
c -