Soracom Lagoon
Table Panel
The Table Panel displays a data series, annotation, and even raw JSON data in a table format. You can configure date and value formatting for each data series, and even specify text, cell, and row color highlighting rules based on the values.
Modes
The table panel supports several methods of organizing or transforming data:
- The time series to rows mode will display one or more data series from Standard queries as rows. Each row will include a timestamp, the name of the metric, and the value of the metric at that time. If you include multiple queries (for example,
temperature
andhumidity
), data from each metric will be split into separate rows instead of being grouped on the same row across separate columns. - The time series to columns will display one or more data seires from Standard queries as columns. Data from each query will be grouped by their timestamp on the same row, and the metric values will be displayed along separate columns.
- The time series aggregations mode will perform a calculation on one or more data series from Standard queries, such as calculating the
Avg
,Min
,Max,
Total
, orCount
of all values in the time range. Each metric will be displayed on separate rows, and the calculations will be added as columns. - The table mode will display a data series from a Table query. Each row will contain the data collected at a particular timestamp, and the values for each metric (such as
temperature
,humidity
, anddistance
) will be displayed along separate columns.
In addition, the table panel also supports an annotations mode which will display a list of annotations that have been added to the dashboard. When using this mode, any queries in the metrics tab are ignored.
The table panel mode can be configured from the Options tab.
Creating a Table Panel
-
Click the
Add panel button at the top of the dashboard.
-
From the list of available panels, select Table.
The table panel will be added to your dashboard.
Editing Panel Settings
To edit the table panel settings, click the Panel Title, then select Edit.
General
The General tab lets you configure basic panel settings. Refer to the Lagoon Panels: General documentation for more information.
Metrics
The Metrics tab lets you configure the data series source. Refer to the Lagoon Panels: Metrics documentation for more information.
In addition to selecting a metric using a Standard query, you can specify the data source as a Table query:
- The Standard query type will allow you to select a single metric (for example,
temperature
) from a data series to be displayed in the table data. - The Table query type will allow you to select all metrics (for example,
temperature
,humidity
, anddistance
) from a data series to be displayed in the table data.
Options
The Options tab lets you configure basic settings that apply to the whole table.
Data
- Table Transform - Specifies how the data should be transformed in order to populate the table.
Time series to rows
- Displays one or more data series from Standard queries as rows. Each row will include a timestamp, the name of the metric, and the value of the metric at that time. If you include multiple queries (for example,temperature
andhumidity
), data from each metric will be split into separate rows instead of being grouped on the same row across separate columns.Time series to columns
- Displays one or more data seires from Standard queries as columns. Data from each query will be grouped by their timestamp on the same row, and the metric values will be displayed along separate columns.Time series aggregations
- Performs a calculation on one or more data series from Standard queries, such as calculating theAvg
,Min
,Max,
Total
, orCount
of all values in the time range. Each metric will be displayed on separate rows, and the calculations will be added as columns.Annotations
- Displays a list of annotations that have been added to the dashboard. When using this option, any queries in the metrics tab are ignored.Table
- Displays a data series from a Table query. Each row will contain the data collected at a particular timestamp, and the values for each metric (such astemperature
,humidity
, anddistance
) will be displayed along separate columns.
- Columns - When Table Transform is set to
Time series aggregations
, this option lets you add calculations to the table, such asAvg
,Min
, andMax
. This option has no effect for other Table Transform options.
Paging
- Rows per page - Specify how many rows of data are displayed at a time. If your data series includes more rows, paging will be displayed automatically.
- Scroll - Enables or disables scrolling within the table. This option can be combined with the Rows per page option so that all data in the table can be viewed by changing pages rather than scrolling.
- Font size - Set the font size.
Column Styles
The Column Style tab lets you configure formatting and color settings that apply individual columns in the table.
Column styles are configured by adding and removing rules. Each rule can be applied to one or more columns by editing the Apply to columns named option. You can then modify additional settings to customize the formatting and color settings for the selected columns:
Options
- Apply to columns named - A string or regular expression that matches the name of a column. For example, if set as
temp
, the formatting and color settings of the rule will be applied to columns named "temp", and if set as/.*/
, the rule will be applied to all columns. - Column Header - Rename the column. If blank, the column will not be renamed.
- Render value as link - Display the value as a URL. If enabled, you can configure the link Url, Tooltip, and whether or not to Open in new tab.
Type
- Type - The formatting to apply to the value in the cell:
Number
- Display the value as a numerical value.String
- Display the value as a string of characters.Date
- Display the value as a date.Hidden
- Hide the column.
Number
The following options can be configured when the Type is set to Number
.
Type
- Unit - Add a unit to the value, such as degrees for a temperature metric, percentage for a humidity metric, or length for a distance metric.
- Decimals - The number of decimal places to show.
Thresholds
- Thresholds - Two numbers separated by a comma which define thresholds between low, medium, and high value ranges:
- When the cell value is below the first number, the first color will be applied.
- When the cell value is between the first and second number, the second color will be applied.
- When the cell value is above the second number, the third color will be applied.
- Color Mode - How color should be applied.
Disabled
- Do not apply any color formatting.Cell
- Change the background color of the individual cell.Value
- Change the text color of the individual cell.Row
- Change the background color of the row.
- Colors - The colors to apply to the cell or row.
String
The following options can be configured when the Type is set to String
. If the original value is a number, you can also configure Value Mappings to create custom text labels that correspond to specific values or value rangs, as well as Thresholds to configure colors that are applied based on the cell value.
Type
- Sanitize HTML - Remove any HTML from the value in order to prevent HTML injection or script attacks.
- Preserve Formatting - Display the value with its original formatting, including any extra spaces or line breaks.
Value Mappings
- Type - The value mapping mode.
Value to text
- Map a single value to a text label.Range to text
- Map a range of values to a text label.
Thresholds - See the Number: Thresholds options above.
Date
The following options can be configured when the Type is set to Date
.
Type
- Date Format - The date and time format to use for displaying the date.
Time Range
The Time Range tab lets you adjust the range of data to use. Refer to the Lagoon Panels: Time Range documentation for more information.
Additional Resources
More information about the table panel can be found in the Grafana: Table Panel documentation.