Package repast.simphony.chart2.engine
Class TimeSeriesChartDescriptor
java.lang.Object
repast.simphony.scenario.AbstractDescriptor
repast.simphony.chart2.engine.ChartDescriptor
repast.simphony.chart2.engine.TimeSeriesChartDescriptor
- All Implemented Interfaces:
Descriptor
ChartDescriptor for TimeSeries type charts where tick is the time value. This
descriptor can provide metadata for aggregate type time series where each
column of data is a series (e.g. "Agent Count") or non-aggregate time series
where each unique value of some data column becomes a series (e.g.
"Agent Id", and the data is the value of the dataValueId passed in the
constructor.
- Author:
- Nick Collier
-
Nested Class Summary
Nested classes/interfaces inherited from class repast.simphony.chart2.engine.ChartDescriptor
ChartDescriptor.ChartType
-
Field Summary
Fields inherited from class repast.simphony.chart2.engine.ChartDescriptor
background, chartTitle, dataSet, gridLineColor, showGrid, showLegend, type, xAxisLabel, yAxisLabel
Fields inherited from class repast.simphony.scenario.AbstractDescriptor
scs
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataValueId
(String dataValueId) Adds the id of a data source to record as a series.void
addSeriesId
(String id, String label, Color color) Adds the id of a data source to record as a series.void
Clears the series data in this descriptor.Gets an iterable over the data value ids.Gets the id of the data source used to provide the data for the time series.int
getSeriesColor
(String seriesId) Gets the color of the specified series.Gets a list of the data source ids to use as series in the chart.getSeriesLabel
(String seriesId) Gets the label for the specified series.void
setDataValueId
(String dataValueId) Sets the id of the data source used to provide the data for the time series.void
setPlotRangeLength
(int plotRangeLength) Methods inherited from class repast.simphony.chart2.engine.ChartDescriptor
doShowLegend, getBackground, getChartTitle, getDataSet, getGridLineColor, getXAxisLabel, getYAxisLabel, isShowGrid, setBackground, setChartTitle, setDataSet, setGridLineColor, setShowGrid, setShowLegend, setXAxisLabel, setYAxisLabel
Methods inherited from class repast.simphony.scenario.AbstractDescriptor
addScenarioChangedListener, getName, readResolve, setName
-
Constructor Details
-
TimeSeriesChartDescriptor
-
TimeSeriesChartDescriptor
-
-
Method Details
-
getPlotRangeLength
public int getPlotRangeLength()- Returns:
- the plotRangeLength
-
setPlotRangeLength
public void setPlotRangeLength(int plotRangeLength) - Parameters:
plotRangeLength
- the plotRangeLength to set
-
getDataValueId
Gets the id of the data source used to provide the data for the time series. This is only applicable for time series of non-aggregate data.- Returns:
- the id of the data source used to provide the data for the time series.
-
setDataValueId
Sets the id of the data source used to provide the data for the time series. This is only applicable for time series of non-aggregate data. param dataValueId the id of the data source used to provide the data for the time series -
addSeriesId
Adds the id of a data source to record as a series.- Parameters:
id
-label
- the chart series label for this id
-
addDataValueId
Adds the id of a data source to record as a series. -
dataValueIds
Gets an iterable over the data value ids.- Returns:
-
clearSeriesIds
public void clearSeriesIds()Clears the series data in this descriptor. -
getSeriesIds
Gets a list of the data source ids to use as series in the chart.- Returns:
- a list of the data source ids to use as series in the chart.
-
getSeriesLabel
Gets the label for the specified series.- Parameters:
seriesId
-- Returns:
- the label for the specified series.
-
getSeriesColor
Gets the color of the specified series.- Parameters:
seriesId
-- Returns:
- the color of the specified series, or null if there is no color.
-