Skip to content

Data table ​

About 7 min read

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 ​

SettingTypeDefaultDescription
Data source mode
dataSourceMode
SelectionconsumptionPivotConsumption 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 sources
seriesConfigJson
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 columns
liveTagFields
Textname,value,unit,timestampComma 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 ​

SettingTypeDefaultDescription
Time source
timeSource
Custom editorlocalLocal: 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.
Bucket
bucketUnit
SelectionmonthTime 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 calendar
alignToCalendar
CheckboxOnWhen on, buckets start at calendar boundaries (for example the 1st of the month). When off they count from the first measurement.
Range type
rangeMode
SelectioncalendarCalendar: the current or a previous day, week, month, quarter or year. Relative: the last N minutes with presets.
Options: calendar Calendar, relative Relative
Period offset
calendarOffset
Number00 is the current period, -1 the previous one. Minimum -120.
Range presets
rangePresetsJson
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 toolbar
showToolbar
CheckboxOnShows previous/next period, current range and refresh buttons in pivot modes.
Aggregation
sampleValueType
Selection2Value 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 buckets
fillEmptyBuckets
CheckboxOnAdds 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 period
calendarPeriod
SelectionyearPeriod shown in calendar range type. Weeks start on Monday.
Options: day Day, week Week, month Month, quarter Quarter, year Year
Relative range (min)
timeRangeMinutes
Number1440Minutes looked back from now in relative range type.
Auto refresh (s)
autoRefreshSeconds
Number00 is off. Otherwise reloads at least every 30 seconds, only while the range contains the current time.

Table layout ​

SettingTypeDefaultDescription
Transpose
transpose
CheckboxOffIn pivot modes rows become tags and columns become buckets. Up to 100 bucket columns are shown.
Total column
showTotalColumn
CheckboxOffAdds a column that combines each row's data cells with the selected calculation.
Total header
totalColumnHeader
Text—Empty shows the localized Total. A translation key can also be entered.
Maximum rows
maxRows
Number400Row limit (1-1000). Only the newest buckets are loaded; when the range has more, a note appears below the table.
Allow sorting
allowSorting
CheckboxOnUsers can sort by clicking a column header. Can be disabled per column with sortable.
Bucket order
bucketOrder
SelectionascInitial bucket order: oldest first or newest first.
Options: asc Oldest first, desc Newest first
Total calculation
totalColumnAggregate
SelectionsumCalculation of the total column: sum, average, minimum or maximum.
Options: sum Sum, avg Average, min Minimum, max Maximum
Row header
rowHeaderCaption
Text—Caption of the first column. Empty shows Period or Tag. A translation key can also be entered.
Page size
pageSize
Number00 shows all rows as one scrolling list; a value above 0 enables paging.

Formatting and columns ​

SettingTypeDefaultDescription
Decimals
numberDecimals
Number2Default number of decimals for numeric cells (0-6). A column setting overrides it.
Unit display
unitDisplay
SelectionheaderUnit 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 separator
useThousandsSeparator
CheckboxOnShows numbers with the locale's thousands separator.
Empty table text
emptyText
Text—Text shown when there is no data. Empty uses the default text.

Summaries and export ​

SettingTypeDefaultDescription
Summary rows
summariesJson
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 summaries
allowRuntimeSummaryPick
CheckboxOffAdds 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 name
exportFileName
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 button
exportEnabled
CheckboxOffShows 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 ​

SettingTypeDefaultDescription
Borders
showBorders
CheckboxOnShows the outer table border.
Alternate row colors
rowAlternation
CheckboxOnAlternates row shading for readability.
Column lines
showColumnLines
CheckboxOnShows vertical lines between columns.

Other settings ​

SettingTypeDefaultDescription
Enable Flashing
enableFlashing
CheckboxOffMakes the widget blink (an opacity pulse every second). Usually bound to an alarm condition.
Log Button
logButton
CheckboxOffAt 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.

2WinScada 2.10