Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The rowPerLocationHtmlTable can be configured directly in <report> section, or in the <declarations> section and reffered from the <report> section. This table is a generic table type and contains for each configured location one row with several columns. The data displayed in a particular column are result of the function that is configured for that column.   Since 2024.01 also htmlColumn’s can be configured. 

For each each column the following elements can be configured:

  • header : text to display in the column header,
  • format: format to use for this column. It refers to the styles that are available in the html template file
  • width: width of the column
  • backgroundColorFunction: function to determine the background color of the cells in the column (see below)
  • foregroundColorFunction: function to determine the foreground color of the cells in the column (see below)
  • function: function that determines/computes the value displayed in the column (see below)

backgroundColorFunction and foregroundColorFunction

These elements currently support the following functions:

For each htmlColumn the following elements can be configured:

  • thTemplate:  custom HTML for the table header
    • Example 1 :  <![CDATA[<th>Location name</th>]]>>
    • Example 2:  <![CDATA[<th class="data-status" style="color:#F9E11E">Max value</th>]]>
  • tdTemplate: custom HTML for the table column
    • Example 1 :  <![CDATA[<td>%LOCATIONATTRIBUTE(shortname)%</td>]]>   
    • Example 2: <![CDATA[<td class="data-status" style="color:%THRESHOLDCROSSING
  • THRESHOLDCROSSING(FIRST_THRESHOLDCOLOR; variableId)
  • THRESHOLDCROSSING
    • (MAX_THRESHOLDCOLOR;
     variableId)
  • INDEXMAXWARNINGLEVELCOLOR(0; variableId)
    • Hm)%">%THRESHOLDCROSSING(MAX_THRESHOLDNAME;Hm)%</td>]]>

backgroundColorFunction and foregroundColorFunction

These elements currently support the following functions:

  • THRESHOLDCROSSING(FIRST_THRESHOLDCOLOR; variableId)
  • THRESHOLDCROSSING(MAX_THRESHOLDCOLOR; variableId)
  • INDEXMAXWARNINGLEVELCOLOR(0; variableId)

function

The existing report functions, that are also used in html-templates, can be configured in the columns. For example MAXVALUE(variableId; numberFormat) or LASTVALUETIME(variableId; dateFormat).

...

Code Block
languagexml
<declarations>
	  <rowPerLocationHtmlTableFormat id="rowPerLocationFormat1" tableStyle="tableStyle3" >
  	   
  	   <column>
	  	<header>Naam</header>
	  	<format>_data_yellow</format>
		<function>LOCATIONATTRIBUTE(shortname)</function>
	    </column>
	   
	       <column>
	    	<header>Tijd maximale overschrijding</header>
	    	<function>THRESHOLDCROSSING(MAX_DATETIME;Qobserved;dateFormat1)</function>
	     </column>			            
	   
	      
	       <column>
	    	<header>Waarde maximale overschrijding (m3/s)</header>
	    	<function>THRESHOLDCROSSING(MAX_VALUE;Qobserved;numberFormat1)</function>
	    	<function>THRESHOLDCROSSING(MAX_VALUE;Qobserved;numberFormat1)</function>
	     </column>			            

	     <column>
	     	 <header>Tijd maximale waterstand</header>
	         <function>MAXTIME(Hobserved;dateFormat1)</function>
	     </column>
	     
	     <column>
	     	 <header>Maximale waterstand (m)</header>
	     </column>			            

	     <column>
	     	 <header>Tijd maximale waterstand</header>
	         <function>MAXTIME(Hobserved;dateFormat1)</function>
	     </column>
	     
	     <column>
	     	 <header>Maximale waterstand (m)</header>
	         <function>MAXVALUE(Hobserved;numberFormat1)</function>
	     </column>
	     
	  </rowPerLocationHtmlTableFormat>
</declarations>

Example of the configuration with htmlColumn:

Code Block
languagexml
<rowPerLocationHtmlTableFormat id="rowPerLocationHtml" tableStyle="tableStyle3">
	<htmlColumn>
        	 <thTemplate>  
         		  <![CDATA[<th>Location name</th>]]>
     		  </thTemplate>
		  <tdTemplate>
			<![CDATA[<td>%LOCATIONATTRIBUTE(id)%</td>]]>                     		 
		  </tdTemplate>                  		  
	</htmlColumn>			
	
	<htmlColumn>
        	 <thTemplate>  
        	 	 <![CDATA[
         			 <th class="data-status" style="color:#F9E11E">Thresholds crossed</th>
         		 ]]>
     		  </thTemplate>
  		  <tdTemplate>
        		   <![CDATA[
          			  <td class="data-status" style="color:%THRESHOLDCROSSING(MAX_THRESHOLDCOLOR; Hobserved)%">%THRESHOLDCROSSING(MAX_THRESHOLDNAME;Hobserved;dateFormat)%</td>
          		   ]]>
     		  </tdTemplate>          <function>MAXVALUE(Hobserved;numberFormat1)</function>
	     </column>
	   		  
	  </rowPerLocationHtmlTableFormat>htmlColumn>			
</declarations>rowPerLocationHtmlTableFormat>



rowPerLocationCSVTable
Anchor
rowPerLocationCSVTable
rowPerLocationCSVTable

...

  • id: unique identifier (as reference to this table);
  • tableStyle: a choice of tableStyle which can be influenced by using the corresponding classes in a cascading style sheet. Choices are tableStyle1 to tableStyle10;
  • column: indicates what (of one or more Timeseries) should be shown in the columns (options are: location, time, date, locationcritical, parameter, parameters, choice, allSeries);
  • row: indicates what (of one or more Timeseries) should be shown in the rows (options are: location, time, date, locationcritical, parameter, parameters, choice, allSeries);
  • relativeWholePeriod: definition of a moving period in time to be displayed (in the example above 24 hours before the day containing T0 of the forecast and 24 after the day containing T0 of the forecast (in total 3 days);
  • topLeftText: definition of the text to be displayed in the upper left cell of the table;
  • cellFormat: format of the cell containing the values;
  • topFormat: Format of the column headers: "0,number,0.00" for a number, "0,date,dd/MMM" for a date.
    • In combination with <column>location</column>, the topFormat specifies what should be written in the header of the column: "1" for location name, "2" for parameter name, "3" for parameter unit (N.B. use curly brackets in place of the quotation marks). Example: <topFormat>{1} - {2} ({3})</topFormat>
    • In combination with <column>parameters</column> or <column>allSeries</column>, the topFormat element can be used to specify a custom column header for each data column. For a table with one data column just specify the custom column header in the topFormat element. For a table with multiple data columns, specify multiple custom column headers (one for each column), separated by "#" symbols, in the topFormat element. E.g. "header1#header2#header3". For parameters the headers can also use "0" for the parameter name and "1" for the unit name. The following example shows a configuration for a table with 2 data columns where the parameter name and value are displayed in the header:  < topFormat >{0} {1}#{0} {1}</ topFormat >
    • To use default headers instead of custom column headers, leave the topFormat element completely empty. If custom column headers are used, then there should be as many custom column headers as data columns in the table, otherwise a warning is logged and default column headers are used instead;
  • leftFormat: format of the most left column;
  • missingValueText: definition of the missing value character. Choices are: " ", "#", "" or "-"; Default: ""
  • nullValueText: definition of the null value (NAN) indicator. Choices are: " ", "-", "-999", "no data";
  • scrollable: Use this to split the table into two parts, one for the header row(s) and one for the data rows. The data row part refers to the tableStyle for this table with "_scrollable" appended. This can be used to make the data rows scrollable while the header row(s) remain fixed. For this to work the referred style needs to be defined in the report tables .css file.
  • tableBackgroundColors:  Override background colors in a HTML report for certain hours in the week. Works similar to: 02 Time Series Display Configuration (tableBackgroundColors)

...