|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--no.hig.okolloen.graphics.chart.ChartDataSet | +--no.hig.okolloen.graphics.chart.ScaledChartDataSet
The ScaledChartDataSet class is used to hold scaleable data values used by LineChart and BarChart. It is more or less just a vector of ChartItems.
Constructor Summary | |
ScaledChartDataSet(int maxElements)
Constructor for the ScaledChartDataSet class. |
Method Summary | |
void |
addElement(ChartItem item)
Adds an element to the ChartDataSet. |
void |
addElement(double value)
Adds an element to the ChartDataSet. |
void |
addElement(double value,
java.awt.Color color)
Adds an element to the ChartDataSet. |
void |
addElement(double value,
java.awt.Color color,
java.lang.String title)
Adds an element to the ChartDataSet. |
double |
getScaledElementAt(int element)
Used to retrieve a normalized representation for the value in the given item. |
java.lang.String[] |
getScaleLabels()
Returns the labels that should be used to indicate max, min and intermediate values. |
void |
rescale()
Used perform a rescale of the dataset. |
void |
setElementAt(int element,
double value)
Sets element at given index in the ChartDataSet to given value. |
void |
setElementAt(int element,
double value,
java.awt.Color color)
Sets element at given index in the ChartDataSet to given value and color. |
void |
setElementAt(int element,
double value,
java.awt.Color color,
java.lang.String title)
Sets element at given index in the ChartDataSet to given value, color and with given title. |
Methods inherited from class no.hig.okolloen.graphics.chart.ChartDataSet |
clear,
getElementAt,
removeElementAt,
setElementAt,
size |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ScaledChartDataSet(int maxElements)
maxElements
- the maximum number of elements held by this ChartDataSet.Method Detail |
public void rescale()
public double getScaledElementAt(int element)
public java.lang.String[] getScaleLabels()
public void addElement(ChartItem item)
item
- the ChartItem to be added.public void addElement(double value)
value
- the value of this datapoint.public void addElement(double value, java.awt.Color color)
value
- the value of this datapoint.color
- the color that will be used when representing this datapointpublic void addElement(double value, java.awt.Color color, java.lang.String title)
value
- the value of this datapoint.color
- the color that will be used when representing this datapointtitle
- the title to give this datapointpublic void setElementAt(int element, double value)
value
- the value of this datapoint.public void setElementAt(int element, double value, java.awt.Color color)
value
- the value of this datapoint.color
- the color of used for the datapoint.public void setElementAt(int element, double value, java.awt.Color color, java.lang.String title)
value
- the value of this datapoint.color
- the color of used for the datapoint.title
- the title to use for this datapoint.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |