public class BarChartModel extends ChartModel
Constructor and Description |
---|
BarChartModel()
Bar chart model constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addColumn()
Adds a bar to the bar chart dataset.
|
void |
addColumn(int index)
Adds a new column to the dataset.
|
void |
addDataSources(int numDataSources)
Create specified number of set of data sources.
|
void |
debug()
Used for debugging model.
|
void |
defaultInit()
Default initialization.
|
java.awt.Color |
getBarColor() |
org.jfree.data.category.DefaultCategoryDataset |
getDataset()
Return JFreeChart pie dataset.
|
double |
getLowerBound() |
double |
getUpperBound() |
static com.thoughtworks.xstream.XStream |
getXStream()
Returns a properly initialized xstream object.
|
boolean |
isAutoRange() |
void |
removeColumn()
Removes the last bar from the bar chart data.
|
void |
removeColumn(int index) |
void |
setAutoRange(boolean autoRange) |
void |
setBarColor(java.awt.Color barColor) |
void |
setBars(double[] input)
Set the values for all the bars using an array.
|
void |
setLowerBound(double lowerBound) |
void |
setRange(double lowerBound,
double upperBound) |
void |
setUpperBound(double upperBound) |
void |
setValue(double value,
java.lang.Integer index)
Set value of a specified bar.
|
addChartSettingsListener, addListener, fireChartInitialized, fireDataSourceAdded, fireDataSourceRemoved, fireSettingsChanged
public org.jfree.data.category.DefaultCategoryDataset getDataset()
public void defaultInit()
public void addDataSources(int numDataSources)
numDataSources
- number of data sources to initialize plot withpublic void addColumn(int index)
index
- public void addColumn()
public void removeColumn()
public void removeColumn(int index)
public static com.thoughtworks.xstream.XStream getXStream()
public void setValue(double value, java.lang.Integer index)
value
- value of barindex
- which bar value to setpublic void debug()
public java.awt.Color getBarColor()
public void setBarColor(java.awt.Color barColor)
barColor
- the barColor to setpublic boolean isAutoRange()
public void setAutoRange(boolean autoRange)
autoRange
- the autoRange to setpublic double getUpperBound()
public void setUpperBound(double upperBound)
upperBound
- the upperBound to setpublic double getLowerBound()
public void setLowerBound(double lowerBound)
lowerBound
- the lowerBound to setpublic void setRange(double lowerBound, double upperBound)
lowerBound
- the lower range boundary.upperBound
- the upper range boundary.public void setBars(double[] input)
input
- the values for the bars as an array