Defines pre-configured displays
Still to document: TimeSpanComplexType
A list of pre-configured displays can be configured in the Display groups. When available on the file system, the name of the XML file is for example: DisplayGroups 1.00 default.xml
The pre-configured displays are organised in a tree view in the time series display (see example in Figure 1). Each pre-configured display is identified by its name, and may include one or more subplots, each with one or more time series lines.
Figure 1 Example of time series display, showing two sub-plots and tree-view of pre-configured displays
Another option is to plot a longitudinal profile in the time series display (see figure 2). The main difference with the normal time series plot is, that on the X-axis the river chainage is plotted. With the control toolbar a specific time step can be selected.
Figure 2 Example of time series display, showing longitudinal profile.
The display groups are configured by first listing the names of the filters to be shown in the display (for example "Rain gauges", "Gauges" and "Fractions" in figure 3 below) under the displayGroup descriptor. The names of the subplots can then be added (e.g. "MacRitchie" and "Woodleigh" below). Each of the subplots is assigned a plotId which links to the definitions of the plots and the time series set to be used. For example in the Fractions displayGroup a stackPlot is defined with a max and min (this file is attached as an example). Please note that the colours, linestyle, precision etc are defined in the TimeSeriesDisplayConfig.
figure 3 - example of a configured displayGroup file (click to enlarge)
Figure 4 Root element of the display groups definition
Root element for each displayGroup. A display group forms one of the main nodes in the tree view and may contain multiple displays. Multiple display groups may be defined.
- description: Optional description
- plot: Plot complex type
- displayGroup: displayGroup complex type
Defines the plots relating to the displayGroup
- description: Description of plot
- legendFontSize: Font size of legend
- axis TitleFontSize: Title font size
- tickLableFontSize: Option to change tick label font size
- synchronizeParameterAxis: Since 2018.02. Option to synchronize the axis range of subplots displaying time series for the same parameter group.
- subplot: Link to subplot complex type.
Defines the groups of plots to be viewed (i.e. the branches of the shortcuts in the display)
- description: Optional description
- display: Display complex type
- displayGroup: displayGroup which links to the plot id
Root element for each subplot. Multiple sub-plots may be defined per display.
- axisScaleUnit: Unit used for rounding the min and max value of the axis. If scale unit = 1 then a range of -3.8 to 4.9 will be rounded to a range of -4 to 5
- barMarginPercentage: Since 2018.02. Only applicable for subplots which contain bars, such as plots of <subPlotType> "horizontalColorCode" or bar charts. Percentage of the bar width by which the bar width will be reduced, to create space between the bars. Default value is the barMarginPercentage in the generalDisplayConfig of the TimeSeriesDisplayConfig.xml (which is 0 by default). Use the general option to set a barMarginPercentage to be applied to all plots containing bars. Use this config option to overrule the general barMarginPercentage for a specific subplot.
- forecastConfidenceTimeSpan: TimeSpanComplexType
- area: Fills the area between multiple time series.
- color: Overides colours specified in the timeseriesdiplay
- lineStyle: Line style of time series marker line. Enumeration of "solid", "none", "bar", "dashdot", "dashed", "dotted". When a suffix of ";thick" is given, 1 will be added to the linewidth found in the TimeSeriesDisplayConfig.xml. For example, if a linewidth of 2 is configured in the TimeSeriesDisplayConfig and for a subplot the linestyle is set to "solid;thick", the resulting linewidth will be 2 + 1 = 3.
By default the <subPlotType> is set to 'standard', which means the default plot type for the configured timeSeriesType will be used. Optionally, you can configure the following other subplot types.
Time series of this subplot are plotted as stacked areas (if lineStyle is solid) or stacked bars (if lineStyle is bar).
Time series of this subplot are plotted as stacked bars. Color of the bar matches the paint scale color associated with the bar value. Height of all bars is the same, and equals Y-axis range / number of series in the plot.
A horizontal bar is plotted for each time series. The color of the bars signify the value for that time series at the given time on the x-axis.
Vertical line fill
Use the <area> element in combination with a <lineStyle> to obtain vertical lines.
This tag can be used to invert the y-axis of a plot. Below a screenshot of an inverted graph. In the example the timeseries with parameter RAIM is inverted.
Available since 2020.02. If it is set to true, the subplot domain axis will be logarithmic. A parameter can also be configured to always/never be displayed on a logarithmic scale, but the subplot setting has precedence. If a parameter is set logarithmic true, but the subplot it appears in is configured logarithmic-false, the axis will not be logarithmic. It is also possible to confige a mixture of logarithmic and non-logarithmic sublots in the same plot:
Logarithmic axis can also be turned on and off manually, using the mnu bar. If you do so, the setting will effect all subplots the same way. Should you wish to reset the sublots to the configured version, use the reset domain axis to configured button.
Available since 2020.02. Default is scaleOutsideMinAndMax. If it is set to scaleOutsideMinAndMax, the y axis will scale to the data available. If it is set to fixedBetweenMinAndMax, the min and max of the y axis will always be the configured values, regardless of the data. This could make the entire data set fall of the visible chart. If all the data is in the middle of min and max withing a small range, the axis will ot scale to the data, it will appear as a small line in the middle. If it is set to scaleBetweenMinAndMax, the min will never be smaller than what is configured, and the max will never be greater than configured, but if the available data falls between these values, the axis will scale so that the data fills the whole area. If the data falls entirely outside of min and max, it will not be visible.
This option can be used to invert drawing order of the lines. By default the lines are drawn in the same order as shown in the legend : the first line first, the last line last. The last line is then on top. If drawing order is inverted the last line in the legend is drawn first and the first line last. The first line is then on top.
Thresholds can be displayed on the left axis, or on the right axis, or on both. By default the thresholds are displayed on the left axis.
To change it, an option ‘ thresholdAxis’ can be used . Configure <thresholdAxis>right</thresholdAxis> if only the right axis should have thresholds, or <thresholdAxis>both</thresholdAxis> if both left and right axes should have thresholds
The tag line can be used to configure both single or dual y-axis. Enables the configuration of a custom colour. visibleInLegend, visibleInPlot and visibleInTable are optional, default setting is true. If visibleInLegend is set to false, the series will show up in the plot area, but not in the legend. If visibleInTable is set to false, the time series can still be sen on the plot, but the data will not show in the table. If visibleInPlot is set to false, the time series can be still shown in the table, but will not be cisible in the plot. VisibleInLegend, visibleInPlot and visibleInTable are supported by clustered bars too.
Important notice: It is possible to configure <visibleInTable>,<visibleInPlot> outside of the wrapper elements <line>, <clusteredBars> or <area>, but it should not be done. There is a bug in one of the external libraries, that causes a mixup, and the wrong <visibleInTable>,<visibleInPlot> will be paired with the wrong timeSerieSet. Always use <visibleInTable> <visibleInPlot> together with <line>, <clusteredBars> or <area>.
Dual y-axis plots
It is possible to have two y-axis visible in the same plot. This can be done by having multiple timeseries where some are assigned to the left y axis and some to the right y axis, or by having a timeseries on the left y axis with an associated rating curve on the right y axis. So every timeseries plot (also in reports) will have a mandatory left y axis to which a timeseries is associated and an optional right y axis to which a timeseries or rating curve is associated.
The display of threshold lines are supported for one y axis. But there can be threshold lines for either the left or the right y axis, but not both.
Multiple TimeSeries plots
To associate a timeseries to the left or right y axis use the <axis> element. This element is optional and leaving it out will associate it (default) to the left axis. Please note that at least one timeseries should be on the left axis (by either settings <axis>left</axis> or leaving the element out and using the default).
Below are two examples of a config and the resulting plot.
When a discharge is displayed, it is possible to show the stage on the right axis. It is not possible to configure this rating on the left axis (and the timeseries on the right axis), since a plot has to have at least one timeseries on the left axis.
The right axis is then not a linear axis but the ticks on the right axis are calculated from the discharge ticks on the left axis.
It is also possible to display the stage and show the discharge on the right axis. The example below shows a display which plots several discharge time series.
The left axis is a linear axis with ticks for the discharge. The right axis is a non-linear axis.
The ticks on the right axis are calculated from the value of the discharge on the left axis by using a rating curve.
Below an configuration and resulting plot
Adding DescriptiveFunctions will result in an extra panel in the display, showing relevant descriptive information about the timeseries in view. More information on the descriptive functions available can be found onTimeSeriesDisplayConfiguration
Options available when creating an variable line width type display
- markerColor: option to set marker color different from line color
- lineWidthScaleFactor: factor to increase or decrease the line width
- valueTimeSeriesSet: Time series for XY line plot
- lineWidthTimeSeriesSet: Time series for line width of the XY plot lines
Below a screenshot of a variable line width plot for different ensemble members that have different line width's. In this case line width is an indication of the probability of the ensemble member. The sum of probability of all ensemble members at a time is one. Selecting separate ensemble members will mark them with the color black.
Single location displays can be used to easily create plots for individual locations. This can either be done for individual locations, or alternatively for a locationSet which will then produce a list of location with their corresponding plot.
Chainage location set
(Since 2016.02) By using a chainage location set in a time series set of a plot in the display groups, a longitudinal profile can be plot based on scalar time series for different locations
Notice that it is not possible to combine a longitudinal plot in with a standard plot (having time on the X-axis). Furthermore, it is not possible to use it for relatedLocations, and also thresholds will not be shown.
Single Domain Axis Time Series (1D Spectra plots)
Time series with one domain axis are displayed as one xy chart per time step, like longitudinal profiles. A slider is used to navigate through time.
Dual Domain Axis Time Series (2D Polar Spectra plots)
When a second domain axis is available this will always be used as direction for a polor plot by the time series dialog. When second domain axis is not a directional parameter or the time series has more than two domain axes the time series can not be diplayed the time series dialog with the current functionality
Additional time series
Additional time series can be configured in display group plots. These series are found via attribute functions in the <locationFunctionEquals selected=@ATTRIBUTE_ID_A@ additional="@ATTRIBUTE_ID_B@"> of the selected time series and the additional time series. When the attribute functions evaluate to the same value the additional time series are added as invisible by default. When additional time series are available the icon of the visibility dialog will change which shows that invisible time series are available and can be made visible.
Since 2020.02, it is possible to match the time series based on any view period (not just the current system time) by setting the showLocationsOutsideVisibilityPeriod option to true.
When it is desired that the additional time series are added only for the same locations then all locations should have an attribute that is equal to their id for example LOC_ID and the locationFunctionEqualselement can be used as follows:
<locationFunctionEquals selected=@LOC_ID@ additional="@LOC_ID@">
In the example below locationFunctionEquals selected="@LOC_ID@" additional="@AFGB_NAAR@"/> is used which will show all a timeseries from the additional time series set where the location has an attribute value AFGB_NAAR which equals the LOC_ID attribute of the shown location of the normal time series set, which can be multiple or even 0.
There is an extra option to show the additional time series in a separate sub plot to make sure there are no plots with incompatible parameter combinations.
Each additional time series element can be given a name, this name will be used as prefix in the legend of the time series and as GroupNode label in the visibility dialog.
Show as Scatter Plot
In a display group the element <showAsScatterPlot> can be used to use a plot where different time series are plotted against each other with the values of the different time series on the X and Y axis.
In between the element <referencePoints> there can be <point> elements defined that will be shown as an interaction line.
With the elements <xAxisRange> and <yAxisRange> the range of the x and y axis can be defined.
By default all time series with the same location are paired up.
Since 2017.02 time series with the same parameter can be paired up by using the element <createPairsByMatchingParameter>true</createPairsByMatchingParameter>
Since 2019.02 it is enabled that when there are only 2 time series they will be paired up irregardless of their location or parameter.
Since 2019.02 The element <markerVisibility> is introduced which enables the possibility the choose whether all data points "all", no data points "none" or only the last data point "onlyLast" should be visualised using a marker
Since 2020.02 it is possible to automatically pair up the time series based on their configured order: <matchTimeSeriesPair>timeSeriesOrder</matchTimeSeriesPair>
Since 2020.02 It is possible to draw colored areas based on configured points. Also, in the plot, the grid lines in the background and the interaction line are visible, and legends are added next to the plot. Below is an example of how a coloredBackgroundArea could be configured:
The above configuration makes the yellow area in the following example:
Definition of a pre-configured display. Each display may contain multiple sub-plots. Multiple displays may be defined per display group.
Figure 4 Elements in the Display section of the DisplayGroups configuration
- description: Optional description
- relativeViewPeriod or season
- nrOfRecentForecasts: Can be applied to show multiple recent forecasts (simulated forecast type)
- plotId: Link to the plot id
Normally, displays are defined with a relative view period, so that the view window progresses with current system time.
This paradigm does not fit systems that are more oriented towards seasonal or water year analysis. Therefore an option has been added since 2011.02 to define a season, such that the time axis is fixed, while the vertical red line (current system time) moves over time from left to right through the display.
To utilize this functionality, a season should be defined instead of a relative view period. This season specification if composed of a start and end date, as well an entry called 'startForwardLookingPeriod'.
The software compares the currentSystemTime against the date specified in the 'startForwardLookingPeriod' entry, to decide if the time axis needs to shift to the next year/season. This decision is relevant within a water supply forecasting context since a few weeks before the end of the water year you may like to look forward to the next wateryear instead of the current wateryear. Use readWriteMode=read only in your time seriessets, as other modes such as 'read complete forecast' stretches the time horizon, disrupting the time horizon displayed outside the season.
E.g. in the code example below, a wateryear is defined from 1st of October to 30th of September. The startForwardLookingPeriod is defined as 1st of September.
view period x-axis (start-end)
1 Oct.2011 - 30 Sept.2012
1 Oct.2012 - 30 Sept.2013
1 Oct.2012 - 30 Sept.2013
The associated display looks like:
To tie the date/time ticks to the valid times of the (cardinal) time step, configure ‘tickTimeStep’ in DisplayGroups.xml. For example, if the ‘tickTimeStep’ is 6 hours then the ticks are always aligned with the synoptic times 00Z, 06Z, 12Z, 18Z. When we are zooming out and there is no space to display all date/times along the x-axis, then one or more synoptic times ticks are omitted. For example we see ticks at 00Z and 18Z.
Options available when creating an area type display
- color: Overides other predefined colours
- opaquenessPercentage: Opaqueness expressed as a percentage
- IncludesZeros: When true the zero is always included in the painted extent
Making stacked graphs
Since 2007/02 release the functionality of the SubPlotArea complex type has been extended to include stack plots. The only thing needed to implement this is to add a stackPlot="true" attribute to a subplot element. Attached to this page is a example of this funtionality.
If stackPlot is True, the timeseries of this subplot are plotted as stacked areas, except for the timeseries that are specified inside the (optional) element <area>. Area-series are always plotted as so called 'difference area'.
Attribute stackPlot is intended as overruling of the default series paint (i.e. line or bar)
It is not possible to combine 'stacked areas' and lines/bars in one plot.
A configuration example of an application of stacked graphs can be find in the how to page How to import and visualize rain and dropsize distribution data from WaterML 2.0 format.
Display groups may be defined while DELFT-FEWS is running and reloaded by re-opening the time series dialogue. If a mistake is made, then the shortcuts item to open the tree view will not appear and an appropriate message will be generated. After resolving the mistake the item will again become available on re-loading the display.