public class PieChartModel extends ChartModel
Constructor and Description |
---|
PieChartModel()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDataSource()
Adds a data source to the plot.
|
void |
addDataSources(int numDataSources)
Create specified number of set of data sources.
|
void |
clearChart()
Clears data from the chart.
|
void |
defaultInit()
Default initialization.
|
org.jfree.data.general.DefaultPieDataset |
getDataset() |
static com.thoughtworks.xstream.XStream |
getXStream()
Returns a properly initialized xstream object.
|
void |
removeDataSource()
Removes a data source from the plot.
|
void |
setValue(double value,
java.lang.Integer index)
Set the value of a specified "slice".
|
void |
setValues(double[] input)
Set the values for all the "slices" using an array.
|
void |
updateTotalValue()
Updates the total value across all data items.
|
addChartSettingsListener, addListener, fireChartInitialized, fireDataSourceAdded, fireDataSourceRemoved, fireSettingsChanged
public void defaultInit()
public void addDataSources(int numDataSources)
numDataSources
- number of data sources to initialize plot withpublic void addDataSource()
public void removeDataSource()
public void clearChart()
public void updateTotalValue()
public org.jfree.data.general.DefaultPieDataset getDataset()
public static com.thoughtworks.xstream.XStream getXStream()
public void setValue(double value, java.lang.Integer index)
value
- the value to setindex
- the index of the slice to setpublic void setValues(double[] input)
input
- the values for the slices as an array