The Table Node is a powerful mechanism for defining, processing, and styling tabular data extracted from a loaded data source. It leverages a comprehensive pipeline of data transformations (filtering, grouping, pivoting) before the data is rendered.
The structure is composed of the TableNode container and the nested Table configuration object.
| Field | Type | Description | Default Value |
|---|---|---|---|
|
string |
Optional. Identifies the table node within the report. Used for internal cross referencing |
|
|
string |
Must be set to |
|
|
string |
The unique reference of the data file (from the root |
Required |
|
string |
Optional. Table caption. |
|
|
object |
Optional. A layout configuration object defining renaming and ordering operations. |
{} |
|
object |
Optional. A style configuration object allowing column alignment, resizing and custom styling |
{} |
|
object |
Optional. Configuration for an interactive filter input element added above the table (if supported by the target format/template). |
|
The layout field allows users to rename table columns when rendering, as well as change the column order.
| Field | Type | Description | Default |
|---|---|---|---|
|
|
Map of |
{} |
|
|
List of column names to render respecting the order. If not provided, all columns will be shown. |
|
To rename columns, pass a dictionary containing the original column names as keys and the new names as values.
"layout":{
"rename":{
"ntask":"Number of Tasks (x10)",
"avg_v":"Average Computation Load",
"datetime":""
}
}|
Tip
|
Columns can be renamed into an empty string "" to hide the header name.
|
To order the way the columns appear on the rendered table, you can use the column_order field.
This field also controls which columns appear and which are hidden on the tables.
By default, all columns are shown.
It follows the conventions:
-
If
column_orderis not provided, all columns are rendered in the same way they are loaded. -
If
column_orderis[]. No column will be shown on the table. -
If
column_orderis a non-empty list, only the provided columns will be rendered, in the same order as in the list.
The style object defines presentation attributes that are converted into AsciiDoc table attributes and HTML class names for dynamic behavior.
| Field | Type | Description |
|---|---|---|
|
|
Map of |
|
|
Map of |
|
|
List of class names to apply to the table |
The classnames field applies CSS classes to the table, enabling client-side interactive features when the output format supports it (e.g., HTML/Antora with JavaScript).
Users can customize their own classes, but the framework provides the following built-in functionalities.
| Classname | Purpose |
|---|---|
|
Enables client-side sorting by clicking on column headers. |
|
Enables client-side filtering or searching over the table content. |
"style": {
"column_align": {"Time": "right", "Config": "center"},
"classnames": ["sortable", "filterable", "grid"]
}If using the filterable classname, users can provide the filter field to customize the text input appearing on the bottom of the table.
| Field | Type | Description | Default |
|---|---|---|---|
placeholder |
str |
The placeholder for the text input |
"Filter…" |
style |
str |
Optional inline css to include in the |
|
The following example assume a data file was loaded with the name "batch_data".
This example renames the Time column, and orders the column to appear in the order Method, "Time", "Status" from left to right.
It also enables interactive sorting and filtering for the final HTML output.
{
"type": "table", "ref": "batch_data",
"layout": {
"column_order": ["Method", "Time", "Status"],
"rename": { "Time": "Execution Time (s)" },
},
"style": {
"column_align": { "Time": "right" },
"classnames": ["sortable", "filterable"]
}
}