Class DefaultSimChartStyle
java.lang.Object
net.simplace.ui.jfreechart.AbstractChartStyle
net.simplace.ui.jfreechart.DefaultSimChartStyle
- All Implemented Interfaces:
ChartStyle
Default chart style for simulation results over time: a value plot with up to two value axes (lines or bars for
simulated values, bullets with error bars for measured data, bars for resource data) and/or an array plot
showing the values of an array variable (e.g. soil layers) as colored blocks with a paint scale legend. If both
exist, they are combined with a shared date axis.
- Author:
- Andreas Enders
-
Nested Class Summary
Nested classes/interfaces inherited from interface ChartStyle
ChartStyle.ChartType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.jfree.chart.plot.PlotOrientationStores the orientation of the chart (not used).Fields inherited from class AbstractChartStyle
iLegend, iObservable, iTitle, iTooltips, iType, iURLs, iXAxisTitle, iYAxisTitle -
Constructor Summary
ConstructorsConstructorDescriptionCreates an array style with default values.Creates a style without titles, legend, tooltips and URLs.DefaultSimChartStyle(ChartStyle.ChartType aType, String aTitle, String aXTitle, String aYTitle, boolean aLegend, boolean aTooltips, boolean aURLs, Map<org.jfree.data.general.Dataset, net.simplace.sim.util.FWSimVariable<?>> aDatasetMap, net.simplace.sim.io.FWSimIOAdapter.FREQUENCE aFrequence) Creates a chart style. -
Method Summary
Modifier and TypeMethodDescriptionorg.jfree.chart.JFreeChartapplyToDataset(List<org.jfree.data.general.Dataset> aDataset) Generates a chart using the given data and the style represented by this class.Methods inherited from class AbstractChartStyle
getTitle, getType, getXAxisTitle, getYAxisTitle, hasLegend, hasTooltips, hasURLs, setLegend, setObservable, setTitle, setTooltips, setType, setURLs, setXAxisTitle, setYAxisTitle
-
Field Details
-
iOrientation
protected org.jfree.chart.plot.PlotOrientation iOrientationStores the orientation of the chart (not used).
-
-
Constructor Details
-
DefaultSimChartStyle
public DefaultSimChartStyle()Creates an array style with default values. -
DefaultSimChartStyle
Creates a style without titles, legend, tooltips and URLs.- Parameters:
aType- type of the chart layout
-
DefaultSimChartStyle
public DefaultSimChartStyle(ChartStyle.ChartType aType, String aTitle, String aXTitle, String aYTitle, boolean aLegend, boolean aTooltips, boolean aURLs, Map<org.jfree.data.general.Dataset, net.simplace.sim.util.FWSimVariable<?>> aDatasetMap, net.simplace.sim.io.FWSimIOAdapter.FREQUENCE aFrequence) Creates a chart style.- Parameters:
aType- style typeaTitle- title for the chartaXTitle- title for the chart's X-axisaYTitle- title for the chart's Y-axis (the axis of the array plot)aLegend- flag whether a legend is generatedaTooltips- flag whether tool tips are generatedaURLs- flag whether URLs are generatedaDatasetMap- the variable of each dataset;nullor empty for an empty mapaFrequence- output frequency of the values
-
-
Method Details
-
applyToDataset
Generates a chart using the given data and the style represented by this class. AnDefaultXYZDatasetgoes to the array plot, time series with the unit of the y axis title are drawn as lines into the array plot,XYIntervalSeriesCollections (except groupSD) as resource bars and all other datasets on the first or second value axis, grouped by unit. Datasets of further units are ignored.Note: every dataset must be contained in the dataset map, otherwise a
NullPointerExceptionis thrown.- Parameters:
aDataset- the data for the chart- Returns:
- the chart
-