org.jCharts.axisChart.axis.scale
public abstract class ScaleCalculator extends Object
Modifier and Type | Field and Description |
---|---|
protected double |
increment |
private double |
maxValue |
private double |
minValue |
private int |
numberOfScaleItems |
private int |
roundingPowerOfTen |
Constructor and Description |
---|
ScaleCalculator() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
computeIncrement()
Computes the scale increment.
|
void |
computeScaleValues()
Drives the computation of the axis increment and related values taking into account the
user specified rounding criteria.
|
double |
getIncrement() |
double |
getMaxValue() |
double |
getMinValue() |
int |
getNumberOfScaleItems() |
int |
getRoundingPowerOfTen() |
protected double |
round(double value,
double powerOfTen)
Rounds the passed value by the power of ten specified
|
protected void |
roundTheIncrement(double powerOfTen)
Rounds the scale increment up by the power of ten specified in the properties.
|
void |
setMaxValue(double maxValue) |
void |
setMinValue(double minValue) |
void |
setNumberOfScaleItems(int numberOfScaleItems) |
void |
setRoundingPowerOfTen(int powerOfTen)
Sets the exponent power of ten to round values to.
|
String |
toString() |
private double minValue
private double maxValue
private int roundingPowerOfTen
private int numberOfScaleItems
protected double increment
protected abstract void computeIncrement()
public final void computeScaleValues()
public final void setMinValue(double minValue)
public final double getMinValue()
public final void setMaxValue(double maxValue)
public final double getMaxValue()
public final double getIncrement()
public int getNumberOfScaleItems()
public void setNumberOfScaleItems(int numberOfScaleItems)
public final void setRoundingPowerOfTen(int powerOfTen)
powerOfTen
- exponent of ten to round to: 1=10, 2=100, -2=.01public final int getRoundingPowerOfTen()
protected double round(double value, double powerOfTen)
value
- the value to roundpowerOfTen
- the product of 10 times the rounding property.protected void roundTheIncrement(double powerOfTen)
powerOfTen
- the value of 10 times the rounding property.