|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.jfreechart.MetaDatasetProducer
org.progeeks.jfreechart.XYDatasetProducer
org.progeeks.jfreechart.TimeSeriesDatasetProducer
public class TimeSeriesDatasetProducer
A MetaDatasetProducer
for TimeSeries
collections. Collections
can be generated from a list of any object that has public accessors for the (time, value) coordinates
of a TimeSeriesDataItem
. If no value property is set, the producer will simply count the
number of data items for a series in each time slice (assuming that addValues
has not been
set to false. The object class should also have a property that can be used to identify
the name of the series that a particular data object belongs to. If no such value is set, then
a single series will be generated with a default name.
Last, make sure to read the notes in MetaDatasetProducer
that explain how to use
the property of a property in a field.
Field Summary | |
---|---|
protected boolean |
domainIsPointsInTime
|
protected boolean |
fillHoles
|
protected long |
historyCount
|
protected static Log |
log
|
protected org.jfree.data.time.TimePeriodAnchor |
timePeriodAnchor
|
protected java.lang.String |
timeUnit
|
protected java.lang.Class |
timeUnitClass
|
protected static java.util.Map |
timeUnitClasses
|
protected java.lang.reflect.Constructor |
timeUnitConstructor
|
Fields inherited from class org.progeeks.jfreechart.MetaDatasetProducer |
---|
addValues, dataClassIsMetaClass, dataMetaClass, dataObjectClass, defaultSeriesName, filteredSeries, PARAM_DATA, PARAM_EXISTING_DATASET, producerId, seriesNameProperty, storeOriginalData |
Fields inherited from interface de.laures.cewolf.DatasetProducer |
---|
PRODUCER_ATTRIBUTE_NAME |
Constructor Summary | |
---|---|
TimeSeriesDatasetProducer()
|
Method Summary | |
---|---|
boolean |
getFillHoles()
If true, once all data has been processed, the producer will iterate through each series and insert an item with a 0 value for any TimePeriod that doesn't have data. |
long |
getHistoryCount()
|
java.lang.Object |
getOriginalData(org.jfree.chart.entity.ChartEntity entity)
Return the linked original data (if we have it) |
org.jfree.data.time.TimePeriodAnchor |
getTimePeriodAnchor()
|
java.lang.String |
getTimeProperty()
|
java.lang.String |
getTimeUnit()
|
java.lang.String |
getValueProperty()
|
protected void |
init()
Validates input settings, sets up dynamic time unit classes |
boolean |
isDomainIsPointsInTime()
This controls how the last period in a time series is displayed - either as the full size of the time period or only up until the current time. |
java.lang.Object |
produceDataset(java.util.Map params)
|
void |
setDomainIsPointsInTime(boolean domainIsPointsInTime)
|
void |
setFillHoles(boolean fillHoles)
|
void |
setHistoryCount(long historyCount)
Used to set the TimeSeries.setMaximumItemAge property. |
void |
setTimePeriodAnchor(org.jfree.data.time.TimePeriodAnchor timePeriodAnchor)
|
void |
setTimeProperty(java.lang.String timeProperty)
Sets the underlying xProperty. |
void |
setTimeUnit(java.lang.String timeUnit)
Must be one of "Millisecond", "Second", "Minute", "Hour", "Day", "Week", "Month", "Quarter", "Year". |
void |
setValueProperty(java.lang.String seriesValueProperty)
Sets the underlying yProperty. |
Methods inherited from class org.progeeks.jfreechart.XYDatasetProducer |
---|
getItemYValue, getXProperty, getYProperty, setXProperty, setYProperty |
Methods inherited from class org.progeeks.jfreechart.MetaDatasetProducer |
---|
createMetaObject, findOrCreateMetaClass, getDataObjectClass, getDefaultSeriesName, getFilteredSeries, getMetaObject, getProducerId, getPropertyValue, getSeriesNameProperty, getStoreOriginalData, hasExpired, isAddValues, produceDataset, produceDataset, setAddValues, setDataObjectClass, setDefaultSeriesName, setFilteredSeries, setProducerId, setSeriesNameProperty, setStoreOriginalData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Log log
protected java.lang.String timeUnit
protected long historyCount
protected boolean fillHoles
protected org.jfree.data.time.TimePeriodAnchor timePeriodAnchor
protected boolean domainIsPointsInTime
protected java.lang.Class timeUnitClass
protected java.lang.reflect.Constructor timeUnitConstructor
protected static final java.util.Map timeUnitClasses
Constructor Detail |
---|
public TimeSeriesDatasetProducer()
Method Detail |
---|
protected void init() throws java.lang.Exception
init
in class XYDatasetProducer
java.lang.Exception
public java.lang.Object produceDataset(java.util.Map params) throws de.laures.cewolf.DatasetProduceException
produceDataset
in interface de.laures.cewolf.DatasetProducer
produceDataset
in class XYDatasetProducer
de.laures.cewolf.DatasetProduceException
DatasetProducer.produceDataset(java.util.Map)
public java.lang.Object getOriginalData(org.jfree.chart.entity.ChartEntity entity)
getOriginalData
in class MetaDatasetProducer
entity
- Normally, an item indicating where a user clicked in the chart accorsing to
series, X/Y value or category value. A "non-data" entity (like a
LegendItemEntity
) could also be passed in, but in that case the
routine will return a null.
public java.lang.String getTimeProperty()
public java.lang.String getValueProperty()
public java.lang.String getTimeUnit()
public long getHistoryCount()
public boolean getFillHoles()
TimePeriod
that doesn't have data. This
keeps charts from looking like there is a gradual change from one period to the next when, in
fact, the data goes to 0 in between.
public void setTimeProperty(java.lang.String timeProperty)
timeProperty
- The timeProperty to set.public void setValueProperty(java.lang.String seriesValueProperty)
seriesValueProperty
- The seriesValueProperty to set.public void setTimeUnit(java.lang.String timeUnit)
timeUnit
- The timeUnit to set.public void setHistoryCount(long historyCount)
TimeSeries.setMaximumItemAge
property.
historyCount
- The historyCount to set.public void setFillHoles(boolean fillHoles)
fillHoles
- The fillHoles to set.public org.jfree.data.time.TimePeriodAnchor getTimePeriodAnchor()
public void setTimePeriodAnchor(org.jfree.data.time.TimePeriodAnchor timePeriodAnchor)
timePeriodAnchor
- The timePeriodAnchor to set.public boolean isDomainIsPointsInTime()
public void setDomainIsPointsInTime(boolean domainIsPointsInTime)
domainIsPointsInTime
- The domainIsPointsInTime to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |