|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschmitzm.jfree.feature.style.FeatureChartUtil
public class FeatureChartUtil
This class contains static utility methods related to chart styles based on
FeatureCollection
.
Field Summary | |
---|---|
static FeatureChartStyleXMLFactory |
FEATURE_CHART_STYLE_FACTORY
Instance of ChartStyleXMLFactory . |
Constructor Summary | |
---|---|
FeatureChartUtil()
|
Method Summary | |
---|---|
static HashMap<String,StaticBin1D> |
calcStatisticsForNormalization(FeatureCollection fc,
FeatureChartStyle chartStyle)
Calculates statistics needed to normalize data. |
static DefaultCategoryDataset |
createCategoryDataset(FeatureCollection fc,
FeatureChartStyle chartStyle)
Creates a XYDataset for 2 (or more) attributes of a
FeatureCollection . |
static Dataset |
createDataset(FeatureCollection fc,
FeatureChartStyle style)
Creates a Dataset for 1 or more attributes of a
FeatureCollection . |
static XYSeriesCollection |
createXYDataset(FeatureCollection fc,
FeatureChartStyle chartStyle)
Creates a XYDataset for 2 (or more) attributes of a
FeatureCollection . |
static List<FeatureDatasetSelectionModel<?,?,?>> |
getFeatureDatasetSelectionModelFor(JFreeChart chart)
Returns all DatasetSelectionModels that can
be reached via the renderers of a chart. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final FeatureChartStyleXMLFactory FEATURE_CHART_STYLE_FACTORY
ChartStyleXMLFactory
.
Constructor Detail |
---|
public FeatureChartUtil()
Method Detail |
---|
public static List<FeatureDatasetSelectionModel<?,?,?>> getFeatureDatasetSelectionModelFor(JFreeChart chart)
DatasetSelectionModels
that can
be reached via the renderers of a chart.
chart
- a chartpublic static Dataset createDataset(FeatureCollection fc, FeatureChartStyle style)
Dataset
for 1 or more attributes of a
FeatureCollection
. According to the feature attribute type the
method decides whether a XYDataset
or a CategoryDataset
is created:CategoryDataset
is
created always. Otherwise the default is to create a XYDataset
.
The flag forceCat
can be used to create CategoryDataset
for numeric X attributes.
fc
- a FeatureCollection
forceCat
- forces a CategoryDataset
also for numeric X attributessort
- sorts the features according to xAttr
before creating
the datasetxAttr
- feature attribute used for the X-valueyAttr
- feature attribute(s) used for the Y-value (at least one; for
each a series is created in the dataset)public static XYSeriesCollection createXYDataset(FeatureCollection fc, FeatureChartStyle chartStyle)
XYDataset
for 2 (or more) attributes of a
FeatureCollection
. XYDateset can only be created for
numeric attributes.
fc
- a FeatureCollection
style
- defines the attributes used to create the dataset from, as
well as the sorting and normalization properties
IllegalArgumentException
- if less then 2 attributes are specified
UnsupportedOperationException
- if attributes are not numericpublic static HashMap<String,StaticBin1D> calcStatisticsForNormalization(FeatureCollection fc, FeatureChartStyle chartStyle)
fc
- FeatureCollection
where the data comes fromchartStyle
- ChartStyle
to determine which attributes shall be
normalized.public static DefaultCategoryDataset createCategoryDataset(FeatureCollection fc, FeatureChartStyle chartStyle)
XYDataset
for 2 (or more) attributes of a
FeatureCollection
. XYDateset can only be created for
numeric attributes.
fc
- a FeatureCollection
style
- defines the attributes used to create the dataset from, as
well as the sorting and normalization properties
IllegalArgumentException
- if less then 2 attributes are specified
UnsupportedOperationException
- if attributes are not numeric
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |