Data table
TwDataTable · Category: Charts
Settings
These settings are in the properties panel on the right while the widget is selected, mostly in the Data Table Settings section. The default value is the value the widget has when it is first added to a page.
Data source
| Setting | Type | Default | Description |
|---|---|---|---|
Data source modedataSourceMode | Selection | consumptionPivot | Consumption pivot: consumption (difference sum) per period. History pivot: aggregated history value per period. Live tags: one row per tag with current values. Static: hand-written rows and columns. Options: consumptionPivot Consumption pivot, historyPivot History pivot, liveTags Live tags, static Static table |
Tag sourcesseriesConfigJson | Series configuration | [] | Choose the tags shown in the table. In pivot modes each tag becomes a column (or a row when transposed); in live tag mode each tag is a row. Up to 50 sources. |
Live tag columnsliveTagFields | Text | name,value,unit,timestamp | Comma separated column list: name, tagName, description, value, unit, quality, timestamp. Used only in live tag mode. |
Static rows (JSON)staticRowsJson | Code | [] | Row list for static mode (JSON array). Each row holds values by column key. A cell is plain text/number or an object with type and value: type text, tag (tag value) or expression. Up to 200 rows. |
Time range and buckets
| Setting | Type | Default | Description |
|---|---|---|---|
Time sourcetimeSource | Custom editor | local | Local: the table uses its own range settings. Page time: consumption and history pivots follow the page time picker; live and static tables are not affected. |
BucketbucketUnit | Selection | month | Time bucket of pivot rows (hour, day, week, month, quarter, year). Auto chooses from the range length. Weeks (starting Monday) and quarters are calendar aligned; they are loaded as days and months and combined in the table. Options: hour Hourly, day Daily, week Weekly, month Monthly, quarter Quarterly, year Yearly, auto Auto |
Align to calendaralignToCalendar | Checkbox | On | When on, buckets start at calendar boundaries (for example the 1st of the month). When off they count from the first measurement. |
Range typerangeMode | Selection | calendar | Calendar: the current or a previous day, week, month, quarter or year. Relative: the last N minutes with presets. Options: calendar Calendar, relative Relative |
Period offsetcalendarOffset | Number | 0 | 0 is the current period, -1 the previous one. Minimum -120. |
Range presetsrangePresetsJson | Multi-line text | [ { "label": "1h", "minutes": 60, "enabled": true }, { "label": "6h", "minutes": 360, "enabled": true }, { "label": "24h", "minutes": 1440, "enabled": true } ] | Preset range buttons shown in the toolbar in relative range type. |
Show toolbarshowToolbar | Checkbox | On | Shows previous/next period, current range and refresh buttons in pivot modes. |
AggregationsampleValueType | Selection | 2 | Value calculated per bucket in history pivot: minimum, maximum, average, sum or count. Weekly and quarterly buckets combine the daily or monthly values (the average is the mean of those averages). Options: 0 Minimum, 1 Maximum, 2 Average, 3 Sum, 4 Count |
Show empty bucketsfillEmptyBuckets | Checkbox | On | Adds empty rows for buckets without data, so a yearly table shows all 12 months. Only the newest buckets that fit the row limit are filled. |
Calendar periodcalendarPeriod | Selection | year | Period shown in calendar range type. Weeks start on Monday. Options: day Day, week Week, month Month, quarter Quarter, year Year |
Relative range (min)timeRangeMinutes | Number | 1440 | Minutes looked back from now in relative range type. |
Auto refresh (s)autoRefreshSeconds | Number | 0 | 0 is off. Otherwise reloads at least every 30 seconds, only while the range contains the current time. |
Table layout
| Setting | Type | Default | Description |
|---|---|---|---|
Transposetranspose | Checkbox | Off | In pivot modes rows become tags and columns become buckets. Up to 100 bucket columns are shown. |
Total columnshowTotalColumn | Checkbox | Off | Adds a column that combines each row's data cells with the selected calculation. |
Total headertotalColumnHeader | Text | — | Empty shows the localized Total. A translation key can also be entered. |
Maximum rowsmaxRows | Number | 400 | Row limit (1-1000). Only the newest buckets are loaded; when the range has more, a note appears below the table. |
Allow sortingallowSorting | Checkbox | On | Users can sort by clicking a column header. Can be disabled per column with sortable. |
Bucket orderbucketOrder | Selection | asc | Initial bucket order: oldest first or newest first. Options: asc Oldest first, desc Newest first |
Total calculationtotalColumnAggregate | Selection | sum | Calculation of the total column: sum, average, minimum or maximum. Options: sum Sum, avg Average, min Minimum, max Maximum |
Row headerrowHeaderCaption | Text | — | Caption of the first column. Empty shows Period or Tag. A translation key can also be entered. |
Page sizepageSize | Number | 0 | 0 shows all rows as one scrolling list; a value above 0 enables paging. |
Formatting and columns
| Setting | Type | Default | Description |
|---|---|---|---|
DecimalsnumberDecimals | Number | 2 | Default number of decimals for numeric cells (0-6). A column setting overrides it. |
Unit displayunitDisplay | Selection | header | Unit shown in the column/row header, in every cell, or not at all. Options: header In header, cell In cell, none Hidden |
Column settings (JSON)columnsJson | Code | [] | Column list (JSON array). Fields: key, header, dataType, decimals, useGrouping, unit, alignment, width, visible, sortable, rules. In pivot modes key is the tag source id, __rowHeader or __total. rules holds up to 5 rules: op (gt, gte, lt, lte, eq, neq, between), value, value2, tone (success, warning, danger, info, accent, muted). In static mode it defines all columns. |
Thousands separatoruseThousandsSeparator | Checkbox | On | Shows numbers with the locale's thousands separator. |
Empty table textemptyText | Text | — | Text shown when there is no data. Empty uses the default text. |
Summaries and export
| Setting | Type | Default | Description |
|---|---|---|---|
Summary rowssummariesJson | Custom editor | [] | Rows shown under the table. Tick a calculation to add its row. Leave the column list empty to use all numeric columns, or pick the columns it applies to. Values are calculated from the unrounded data and use each column's number format. Share % shows each column's sum as a percentage of the summed columns; the Total column is not part of that base. First and last use the configured row order. |
Viewer can choose summariesallowRuntimeSummaryPick | Checkbox | Off | Adds a Σ menu to the toolbar so viewers can show or hide summary rows. The choice lasts until the page is reloaded and is not saved. |
Export file nameexportFileName | Text | — | File name template without extension. Placeholders: [title] widget title, [page] page title, [start] and [end] range dates, [range] range label, [date] export date. Empty uses [title]_[start]_[end] for time ranges and [title]_[date] otherwise. Characters not allowed in file names are replaced and .xlsx is added. |
Excel export buttonexportEnabled | Checkbox | Off | Shows an Excel button in the toolbar. It exports the visible columns in the current sort order, with number formats, units and the summary rows. In the Editor it exports the preview data. |
Appearance
| Setting | Type | Default | Description |
|---|---|---|---|
BordersshowBorders | Checkbox | On | Shows the outer table border. |
Alternate row colorsrowAlternation | Checkbox | On | Alternates row shading for readability. |
Column linesshowColumnLines | Checkbox | On | Shows vertical lines between columns. |
Other settings
| Setting | Type | Default | Description |
|---|---|---|---|
Enable FlashingenableFlashing | Checkbox | Off | Makes the widget blink (an opacity pulse every second). Usually bound to an alarm condition. |
Log ButtonlogButton | Checkbox | Off | At runtime shows a chart icon when hovering the widget; clicking it adds the Tags bound to the widget to the log Tag list. |
Bindings
In the Bindings (Rules) section of the properties panel, a Tag can be bound to the following properties of this widget with a Direct binding. The binding types (Direct, IntRange, FloatRange, Boolean, Bit) are the same for all widgets; they are described on the Widget Reference page.
title, visible, authorization, x, y, width, height, rotation, class, foregroundColor, backgroundColor, borderColor, borderStyle, borderWidth, borderRadius, borderTopLeftRadius, borderTopRightRadius, enableFlashing, logButton, tableSchemaVersion, dataSourceMode, seriesConfigJson, bucketUnit, sampleValueType, alignToCalendar, fillEmptyBuckets, bucketOrder, rangeMode, calendarPeriod, calendarOffset, timeRangeMinutes, rangePresetsJson, timeSource, showToolbar, autoRefreshSeconds, maxRows, transpose, showTotalColumn, totalColumnAggregate, totalColumnHeader, rowHeaderCaption, liveTagFields, columnsJson, staticRowsJson, numberDecimals, useThousandsSeparator, unitDisplay, allowSorting, pageSize, showBorders, showColumnLines, rowAlternation, emptyText, summariesJson, allowRuntimeSummaryPick, exportEnabled, exportFileName
Common sections
While this widget is selected, the properties panel also shows these common sections: General, Layout, Appearance, Bindings (Rules). These sections are described on the Page Editor page.