|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The StackModel
adapts a chart model and calculates the lead and the
tail of each numeric value in the model. Imagine a stacked bar chart: Each
cell in the model gets its bar and each bar starts at a certain value
(=trail) and ends at a certain value (=lead). In a line chart, only the
lead values are of interest.
The strategy of a stack model defines how negative values get handled.
Method Summary | |
void |
addStackModelListener(StackModelListener listener)
Adds a stack model listener to the list of listeners. |
int |
getColumnCount()
Returns the number of data columns. |
double |
getLead(int rowIndex,
int columnIndex)
Returns the lead value of a given data cell. |
double |
getMaxValue()
Returns the maximum value of all leads and trails. |
double |
getMinValue()
Returns the minimum value of all leads and trails. |
int |
getRowCount()
Returns the number of data rows. |
double |
getTrail(int rowIndex,
int columnIndex)
Returns the trail value of a given data cell. |
boolean |
isRelative()
Returns true if the values in this model are in percent. |
boolean |
isStacked()
Returns true if the values in this model are stacked. |
void |
removeStackModelListener(StackModelListener listener)
Removes a stack model listener from the list of listeners. |
Methods inherited from interface li.netcat.chart.data.ChartModelAdapter |
getChartModel, setChartModel |
Method Detail |
public boolean isStacked()
true
if the values in this model are stacked.
true
if the values in this model are stacked..public boolean isRelative()
true
if the values in this model are in percent.
true
if the values in this model are in percent.public double getMinValue()
public double getMaxValue()
public int getRowCount()
public int getColumnCount()
public double getLead(int rowIndex, int columnIndex)
rowIndex
- The index of the row of the underlying cell.columnIndex
- The index of the column of the underlying cell.
NaN
if the underlying cell does not contain a numeric value.public double getTrail(int rowIndex, int columnIndex)
rowIndex
- The index of the row of the underlying cell.columnIndex
- The index of the column of the underlying cell.
NaN
if the underlying cell does not contain a numeric value.public void addStackModelListener(StackModelListener listener)
public void removeStackModelListener(StackModelListener listener)
listener
- A listener that has been added.
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |