Anchor |
---|
| forecasttable |
---|
| forecasttable |
---|
|
Forecast TableThe contents of the forecast table can be configured using the forecastTable key. The schema for this section is shown on the right. Using the header key, the column headers in the forecast table can be specified. A column can be added with the the column key. The value of this key is used as the name in the header of that column. For each column an id attribute must be specified. Furthermore, the following optional attributes may be specified for a column:unit : a string containing the unit for the column (e.g. "cm" for a water level), which will also appear in the header of the column,type : one of "string", "integer", "float", "boolean", or "dateTime", which indicates the type of data that is displayed in the column,isEditable : a flag with value true or false indicating whether the column is editable for the user (e.g. the user can enter the forecast in this column),isExport : a flag with value true or false indicating whether the column must be exported to file if the forecast is published (editable columns are exported by default),exportName : a string containing the name that must be used for exporting the column to file,lang : a string that specifies the language of the header; this attribute behaves the same as for the title keys.
For example, the header section in the forecast table may look like: Code Block |
---|
| <header>
<column id="station">station</column>
<column id="date">date</column>
<column id="time">time</column>
<column id="astro_level" unit="cm">astronomical water level</column>
<column id="water_level" isEditable="true" unit="cm">water level</column>
<column id="evacuate" isEditable="true" type="boolean">evacuate?</column>
</header>
|
Rows can be added to the forecast table by specifying the row key. The number of rows is arbitrary. For each row, an identifier must be specified using the id attribute. Content for a row is added using the cell key, where each cell must correspond to a column in the header. This can be achieved with the columnId attribute of the row key. For example: Code Block |
---|
| <row id="Vlissingen">
<cell columnId="station">Vlissingen</cell>
<cell columnId="date">12 Mar</cell>
<cell columnId="time">17h16</cell>
<cell columnId="astro_level">237</cell>
</row>
|
The cell key also supports a lang attribute that behaves the same as for the title keys.
With the publication of a forecast, a note can be attached. An optional initial text in this note field can be specified with the forecastNote key. |