...
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;
- 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 | ||
---|---|---|
| ||
<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>
</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 | ||
---|---|---|
| ||
<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> </htmlColumn> </rowPerLocationHtmlTableFormat> |
rowPerLocationCSVTable
Anchor | ||||
---|---|---|---|---|
|
...