public class TimeSeriesChartModel extends ChartModel
ChartModel.EventType| Constructor and Description |
|---|
TimeSeriesChartModel(TimeSeriesDataModel timeSeriesDataModel)
Instantiates a new time series chart model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOrUpdateValuePair(int seriesIndex,
java.lang.Number key,
java.lang.Number value)
Adds or updates a value to/in a data series.
|
void |
addSeries(DataSeries series)
Adds the series.
|
void |
editSeriesAddData(DataSeries series,
int targetDataSeriesIndex)
Edits the data series by adding data.
|
void |
editSeriesAddOrExchangeData(DataSeries series,
int targetDataSeriesIndex)
Edits the data series by adding or exchanging data.
|
void |
editSeriesExchangeData(DataSeries series,
int targetDataSeriesIndex)
Edits the data series by exchanging data.
|
void |
editSeriesRemoveData(DataSeries series,
int targetDataSeriesIndex)
Edits the data series by remove data.
|
void |
exchangeSeries(int seriesIndex,
DataSeries series)
Exchanges the series specified by the series index with the given DataSeries.
|
TimeSeriesChartSettings |
getChartSettings()
Returns the chart settings.
|
org.jfree.data.time.TimeSeries |
getSeries(int seriesIndex)
Returns the jfreeChart series specified by the index position.
|
org.jfree.data.time.TimeSeries |
getSeries(java.lang.String seriesLabel)
Returns the jfreeChart series with the specified label.
|
int |
getSeriesCount()
Returns the number of series in this chart.
|
org.jfree.data.time.TimeSeriesCollection |
getTimeSeriesCollection()
Gets the JFreeChart data model for this chart
|
void |
removeSeries(int seriesIndex)
Removes the data series with the given index from the chart model
|
void |
removeValuePair(int seriesIndex,
java.lang.Number key)
Removes the value pair with the given key from the series with the given index.
|
void |
setSeriesLabel(int seriesIndex,
java.lang.String newLabel)
Sets a new label for the series with the specified index
|
void |
updateKey(java.lang.Number oldKey,
java.lang.Number newKey)
Update the time stamp in all series that contain it
|
public TimeSeriesChartModel(TimeSeriesDataModel timeSeriesDataModel)
timeSeriesDataModel - the current TimeSeriesDataModelpublic TimeSeriesChartSettings getChartSettings()
ChartModelgetChartSettings in class ChartModelpublic void addSeries(DataSeries series)
ChartModeladdSeries in class ChartModelseries - the seriespublic void exchangeSeries(int seriesIndex,
DataSeries series)
throws NoSuchSeriesException
ChartModelexchangeSeries in class ChartModelseriesIndex - the series indexseries - the DataSeriesNoSuchSeriesException - the no such series exceptionpublic void addOrUpdateValuePair(int seriesIndex,
java.lang.Number key,
java.lang.Number value)
throws NoSuchSeriesException
seriesIndex - The index of the series that should be changedkey - The key for the value pair to be added/updatedvalue - The new value for the value pairNoSuchSeriesException - Will be thrown if there is no series with the specified indexpublic void updateKey(java.lang.Number oldKey,
java.lang.Number newKey)
oldKey - The old time stampnewKey - The new time stamppublic void removeValuePair(int seriesIndex,
java.lang.Number key)
throws NoSuchSeriesException
seriesIndex - The series indexkey - The keyNoSuchSeriesException - Thrown if there is no series with the specified indexpublic void editSeriesAddData(DataSeries series, int targetDataSeriesIndex) throws NoSuchSeriesException
series - the seriestargetDataSeriesIndex - the target data series indexNoSuchSeriesExceptionpublic void editSeriesAddOrExchangeData(DataSeries series, int targetDataSeriesIndex) throws NoSuchSeriesException
series - the seriestargetDataSeriesIndex - the target data series indexNoSuchSeriesExceptionpublic void editSeriesExchangeData(DataSeries series, int targetDataSeriesIndex) throws NoSuchSeriesException
series - the seriestargetDataSeriesIndex - the target data series indexNoSuchSeriesExceptionpublic void editSeriesRemoveData(DataSeries series, int targetDataSeriesIndex) throws NoSuchSeriesException
series - the seriestargetDataSeriesIndex - the target data series indexNoSuchSeriesExceptionpublic org.jfree.data.time.TimeSeries getSeries(int seriesIndex)
ChartModelgetSeries in class ChartModelseriesIndex - the series indexpublic org.jfree.data.time.TimeSeries getSeries(java.lang.String seriesLabel)
ChartModelgetSeries in class ChartModelseriesLabel - The labelpublic void removeSeries(int seriesIndex)
ChartModelremoveSeries in class ChartModelseriesIndex - The series indexpublic org.jfree.data.time.TimeSeriesCollection getTimeSeriesCollection()
public int getSeriesCount()
public void setSeriesLabel(int seriesIndex,
java.lang.String newLabel)
ChartModelsetSeriesLabel in class ChartModelseriesIndex - The series indexnewLabel - The new label