|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.java4less.rchart.Scale
The scale converts the data to screen coordinates. All charts have two scales (except Pies), one per axis.
Example:
// create axis
com.java4less.rchart.Axis XAxis=new Axis(Axis.HORIZONTAL,new Scale());
com.java4less.rchart.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, RChart will calculate them from the DataSeries.
Field Summary | |
boolean |
exactMaxValue
if true, RChart 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
if true, RChart will calculate the min value of the scale using the preferred max values list default value is true for Y axis and false for X axis. |
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
internal use. |
int |
screenMax
maximum value of scale on the screen. |
int |
screenMaxMargin
internal use. |
int |
screenMin
minimum value of scale on the screen. |
Constructor Summary | |
Scale()
|
|
Scale(int ma,
int mi)
creates a scale with the specifed max and min values. |
Method Summary | |
int |
getScreenCoord(double v)
convert a value to the screen coordinate. |
double |
getValue(int c)
converts a screen coordinate to the real value. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean exactMaxValue
public boolean exactMinValue
public double[] preferred_MaxMin_values
public double max
public double min
public int screenMax
public int screenMaxMargin
public int screenMin
public boolean reverse
Constructor Detail |
public Scale()
public Scale(int ma, int mi)
Method Detail |
public int getScreenCoord(double v)
public double getValue(int c)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |