|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jCharts.axisChart.axis.scale.ChartScale
public class ChartScale
Field Summary | |
---|---|
(package private) int |
rounding
The suggested value for the rounding of the data. |
(package private) int |
segments
The number of segments that the suggested yStart, yEnd and yDelta produce. |
(package private) double |
yDelta
The difference between two points on adjacent grid lines. |
(package private) double |
yEnd
The value which the last grid line represents. |
(package private) double |
yMax
The largest number in the dataset. |
(package private) double |
yMin
The smallest number in the dataset. |
(package private) double |
yStart
The value which the first grid line represents. |
Constructor Summary | |
---|---|
ChartScale()
|
|
ChartScale(double[][] data)
Constructor. |
Method Summary | |
---|---|
private void |
calculate()
Compute yDelta, yStart, yEnd, segments and rounding. |
AxisProperties |
getAxisProperties()
Creates and returns a new AxisProperties object based on the internally calculated values of yStart, yDelta, segments and rounding. |
private double |
getMax(double[][] data)
Helper method that finds the largest double in the 2D array of doubles. |
private double |
getMin(double[][] data)
Helper method that finds the smallest double in the 2D array of doubles. |
int |
getRounding()
Accessor for the rounding property. |
int |
getSegments()
Accessor for the segments property. |
double |
getYDelta()
Accessor for the yDelta property. |
double |
getYEnd()
Accessor for the yEnd property. |
double |
getYMax()
Accessor for the yMax property. |
double |
getYMin()
Accessor for the yMin property. |
double |
getYStart()
Accessor for the yStart property. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
double yMax
double yMin
double yDelta
double yStart
double yEnd
int rounding
int segments
Constructor Detail |
---|
public ChartScale()
public ChartScale(double[][] data)
data
- double[] the data for which you would like suggested graph valuesMethod Detail |
---|
public static void main(java.lang.String[] args)
private void calculate()
private double getMax(double[][] data)
data
- double[][] to look into for the max
private double getMin(double[][] data)
data
- double[][] to look into for the min
public double getYMax()
public double getYMin()
public double getYDelta()
public double getYStart()
public double getYEnd()
public int getRounding()
public int getSegments()
public AxisProperties getAxisProperties() throws PropertyException
PropertyException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |