All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----MSBChart.Scale
The scale converts the data to screen coordinates. All charts have two scales (except Pies), one per axis.
Example:
// create axis
MSBChart.Axis XAxis=new Axis(Axis.HORIZONTAL,new Scale());
MSBChart.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.

 
 max
	max
   min
	min
   reverse
	reverse
   screenMax
	screenMax
   screenMaxMargin
	screenMaxMargin
   screenMin
	screenMin
   
 Scale()
	Scale()
   Scale(int, int)
	Scale(int, int)
   
 getScreenCoord(double)
	getScreenCoord(double)
   getValue(int)
	getValue(int)
   
 max
max
public double max
maximum value of the scale.
 min
min
public double min
minimum value of the scale.
 screenMax
screenMax
public int screenMax
maximum value of scale on the screen.
 screenMaxMargin
screenMaxMargin
public int screenMaxMargin
internal use. Calculated by Chart.
 screenMin
screenMin
public int screenMin
minimum value of scale on the screen.
 reverse
reverse
public boolean reverse
internal use. It is true if the scale corresponds to the vertical axis. In the vertical axis the screen coordinate of the min value is greater than the screen coordinate of the max value.
 
 Scale
Scale
public Scale()
 Scale
Scale
 public Scale(int ma,
              int mi)
creates a scale with the specifed max and min values.
 
 getScreenCoord
getScreenCoord
public int getScreenCoord(double v)
convert a value to the screen coordinate.
 getValue
getValue
public double getValue(int c)
converts a screen coordinate to the real value.
All Packages Class Hierarchy This Package Previous Next Index