Class DefaultSimChartStyle

java.lang.Object
net.simplace.ui.jfreechart.AbstractChartStyle
net.simplace.ui.jfreechart.DefaultSimChartStyle
All Implemented Interfaces:
ChartStyle

public class DefaultSimChartStyle extends AbstractChartStyle
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
  • Field Details

    • iOrientation

      protected org.jfree.chart.plot.PlotOrientation iOrientation
      Stores the orientation of the chart (not used).
  • Constructor Details

    • DefaultSimChartStyle

      public DefaultSimChartStyle()
      Creates an array style with default values.
    • DefaultSimChartStyle

      public DefaultSimChartStyle(ChartStyle.ChartType aType)
      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 type
      aTitle - title for the chart
      aXTitle - title for the chart's X-axis
      aYTitle - title for the chart's Y-axis (the axis of the array plot)
      aLegend - flag whether a legend is generated
      aTooltips - flag whether tool tips are generated
      aURLs - flag whether URLs are generated
      aDatasetMap - the variable of each dataset; null or empty for an empty map
      aFrequence - output frequency of the values
  • Method Details

    • applyToDataset

      public org.jfree.chart.JFreeChart applyToDataset(List<org.jfree.data.general.Dataset> aDataset)
      Generates a chart using the given data and the style represented by this class. An DefaultXYZDataset goes to the array plot, time series with the unit of the y axis title are drawn as lines into the array plot, XYIntervalSeriesCollections (except group SD) 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 NullPointerException is thrown.

      Parameters:
      aDataset - the data for the chart
      Returns:
      the chart