Menu
Grafana Cloud Enterprise Open source

Table

Tables are a highly flexible visualization designed to display data in columns and rows. The table visualization can take multiple datasets and provide the option to switch between them. With this versatility, it’s the preferred visualization for viewing multiple data types, aiding in your data analysis needs.

Basic table visualization

You can use a table visualization to show datasets such as:

  • Common database queries like logs, traces, metrics
  • Financial reports
  • Customer lists
  • Product catalogs

Any information you might want to put in a spreadsheet can often be best visualized in a table.

Tables also provide different styles to visualize data inside the table cells, such as colored text and cell backgrounds, gauges, sparklines, data links, JSON code, and images.

Note

Annotations and alerts are not currently supported for tables.

Configure a table visualization

The following video provides a visual walkthrough of the options you can set in a table visualization. If you want to see a configuration in action, check out the video:

Give it a try using Grafana Play
Give it a try using Grafana Play

With Grafana Play, you can explore and see how it works, learning from practical examples to accelerate your development. This feature can be seen on Table Visualizations in Grafana.

Supported data formats

The table visualization supports any data that has a column-row structure.

Note

If you’re using a cell type such as sparkline or JSON, the data requirements may differ in a way that’s specific to that type. For more info refer to Cell type.

Example

This example shows a basic dataset in which there’s data for every table cell:

csv
Column1, Column2, Column3
value1 , value2 , value3
value4 , value5 , value6
value7 , value8 , value9

If a cell is missing or the table column-row structure is not complete, as in the following example, the table visualization won’t display any of the data:

csv
Column1, Column2, Column3
value1 , value2 , value3
gap1   , gap2
value4 , value5 , value6

If you need to hide columns, you can do so using data transformations, field overrides, or by building a query that returns only the needed columns.

Column filtering

You can temporarily change how column data is displayed using column filtering. For example, you can show or hide specific values.

Turn on column filtering

To turn on column filtering, follow these steps:

  1. In Grafana, navigate to the dashboard with the table with the columns that you want to filter.
  2. Hover over any part of the panel to which you want to add the link to display the actions menu on the top right corner.
  3. Click the menu and select Edit.
  4. In the panel editor pane, expand the Table options section.
  5. Toggle on the Column filter switch.

A filter icon (funnel) appears next to each column title.

Column filtering turned on

Filter column values

To filter column values, follow these steps:

  1. Click the filter icon (funnel) next to a column title.

    Grafana displays the filter options for that column.

    Filter column values
  2. Click the checkbox next to the values that you want to display or click Select all.

  3. Enter text in the search field at the top to show those values in the display so that you can select them rather than scroll to find them.

  4. Choose from several operators to display column values:

    • Contains - Matches a regex pattern (operator by default).
    • Expression - Evaluates a boolean expression. The character $ represents the column value in the expression (for example, “$ >= 10 && $ <= 12”).
    • The typical comparison operators: =, !=, <, <=, >, >=.
  5. Click the checkbox above the Ok and Cancel buttons to add or remove all displayed values to and from the filter.

Clear column filters

Columns with filters applied have a blue filter displayed next to the title.

Filtered column

To remove the filter, click the blue filter icon and then click Clear filter.

Sort columns

Click a column title to change the sort order from default to descending to ascending. Each time you click, the sort order changes to the next option in the cycle. You can sort multiple columns by holding the Shift key and clicking the column name.

Sort descending

Dataset selector

If the data queried contains multiple datasets, a table displays a drop-down list at the bottom, so you can select the dataset you want to visualize. This option is only available when you’re editing the panel.

Table visualization with multiple datasets

Configuration options

Panel options

In the Panel options section of the panel editor pane, set basic options like panel title and description, as well as panel links. To learn more, refer to Configure panel options.

Table options

OptionDescription
Show table headerShow or hide column names imported from your data source.
Cell heightSet the height of the cell. Choose from Small, Medium, or Large.
Enable paginationToggle the switch to control how many table rows are visible at once. When switched on, the page size automatically adjusts to the height of the table. This option doesn’t affect queries.
Minimum column widthDefine the lower limit of the column width, in pixels. By default, the minimum width of the table column is 150 pixels. For small-screen devices, such as mobile phones or tablets, reduce the value to 50 to allow table-based panels to render correctly in dashboards.
Column widthDefine a column width, in pixels, rather than allowing the width to be set automatically. By default, Grafana calculates the column width based on the table size and the minimum column width.
Column alignmentSet how Grafana should align cell contents. Choose from: Auto (default), Left, Center, or Right.
Column filterTemporarily change how column data is displayed. For example, show or hide specific values. For more information, refer to Column filtering.

Toggle the Show table footer switch on and off to control the display of the footer. When the toggle is switched on, you can use the table footer to show calculations on fields.

After you activate the table footer, make selections for the following options:

  • Calculation - The calculation that you want to apply.
  • Count rows - This option is displayed if you select the Count calculation. If you want to show the number of rows in the dataset instead of the number of values in the selected fields, toggle on the Count rows switch.
  • Fields - The fields to which you want to apply the calculation. Grafana applies the calculation to all numeric fields if you don’t select a field.

Cell options

Cell options allow you to control how data is displayed in a table. The options are:

  • Cell type - Control the default cell display settings.
  • Wrap text - Wrap text in the cell that contains the longest content in your table.
  • Cell value inspect - Enables value inspection from table cells.

Cell type

By default, Grafana automatically chooses display settings. You can override these settings by choosing one of the following cell types to control the default display for all fields. Additional configuration is available for some cell types.

If you want to apply a cell type to only some fields instead of all fields, you can do so using the Cell options > Cell type field override.

Cell typeDescription
AutoAutomatically displays values with sensible defaults applied.
SparklineShows values rendered as a sparkline.
Colored textIf thresholds are set, then the field text is displayed in the appropriate threshold color.
Colored backgroundIf thresholds are set, then the field background is displayed in the appropriate threshold color.
GaugeCells can be displayed as a graphical gauge, with several different presentation types. You can set the Gauge display mode and the Value display options.
Data linksIf you’ve configured data links, when the cell type is Auto, the cell text becomes clickable. If you change the cell type to Data links, the cell text reflects the titles of the configured data links. To control the application of data link text more granularly, use a Cell option > Cell type > Data links field override.
JSON ViewShows values formatted as code.
ImageIf the field value is an image URL or a base64 encoded image, the table displays the image.
Sparkline

This cell type shows values rendered as a sparkline. To show sparklines on data with multiple time series, use the Time series to table transformation to process it into a format the table can show.

Table using sparkline cell type

You can customize sparklines with many of the same options as the time series visualization including line style and width, fill opacity, gradient mode, and more. You can also change the color of the sparkline by updating the color scheme in the Standard options section of the panel configuration.

Colored text

If thresholds are set, with this cell type, the field text is displayed in the appropriate threshold color.

Table with colored text cell type

Note

This is an experimental feature.
Colored background

If thresholds are set, with this cell type, the field background is displayed in the appropriate threshold color.

Table with colored background cell type

  • Background display mode - Choose between Basic and Gradient.
  • Apply to entire row - Toggle the switch on to apply the background color that’s configured for the cell to the whole row.

Table with background cell color applied to row

Gauge

With this cell type, cells can be displayed as a graphical gauge, with several different presentation types controlled by the gauge display mode and the value display.

Note

The maximum and minimum values of the gauges are configured automatically from the smallest and largest values in your whole dataset. If you don’t want the max/min values to be pulled from the whole dataset, you can configure them for each column using field overrides.
Gauge display mode

You can set three gauge display modes.

OptionDescription
BasicShows a simple gauge with the threshold levels defining the color of gauge.
Table cell with basic gauge mode
GradientThe threshold levels define a gradient.
Table cell with gradient gauge mode
Retro LCDThe gauge is split up in small cells that are lit or unlit.
Table cell with retro LCD gauge mode
Value display

Labels displayed alongside of the gauges can be set to be colored by value, match the theme text color, or be hidden.

OptionDescription
Value colorLabels are colored by value.
Table with labels in value color
Text colorLabels match the theme text color.
Table with labels in theme color
HiddenLabels are hidden.
Table with labels hidden
JSON View

This cell type shows values formatted as code. If a value is an object the JSON view allowing browsing the JSON object will appear on hover.

JSON view
Image

If you have a field value that is an image URL or a base64 encoded image, this cell type displays it as an image.

Table with image cell type

Set the following options:

  • Alt text - Set the alternative text of an image. The text will be available for screen readers and in cases when images can’t be loaded.
  • Title text - Set the text that’s displayed when the image is hovered over with a cursor.

Wrap text

Note

Text wrapping is in public preview, however, it’s available to use by default. We’d love hear from you about how this new feature is working. To provide feedback, you can open an issue in the Grafana GitHub repository.

Toggle the Wrap text switch to wrap text in the cell that contains the longest content in your table.

To wrap the text in a specific column only, use a Fields with name field override, select the Cell options > Cell type override property, and toggle on the Wrap text switch.

This option is available for the following cell types: Auto, Colored text, and Colored background.

Cell value inspect

Enables value inspection from table cells. When the Cell inspect value switch is toggled on, clicking the inspect icon in a cell opens the Inspect value drawer.

The Inspect value drawer has two tabs, Plain text and Code editor. Grafana attempts to automatically detect the type of data in the cell and opens the drawer with the associated tab showing. However, you can switch back and forth between tabs.

This option is available for the following cell types: Auto, Colored text, Colored background, and JSON View.

If you want to apply this setting to only some fields instead of all fields, you can do so using the Cell options > Cell value inspect field override.

Standard options

Standard options in the panel editor pane let you change how field data is displayed in your visualizations. When you set a standard option, the change is applied to all fields or series. For more granular control over the display of fields, refer to Configure overrides.

OptionDescription
UnitChoose which unit a field should use.
Min/MaxSet the minimum and maximum values used in percentage threshold calculations or leave these field empty for them to be calculated automatically.
Field min/maxEnable Field min/max to have Grafana calculate the min or max of each field individually, based on the minimum or maximum value of the field.
DecimalsSpecify the number of decimals Grafana includes in the rendered value.
Display nameSet the display title of all fields. You can use variables in the field title.
Color schemeSet single or multiple colors for your entire visualization.
No valueEnter what Grafana should display if the field value is empty or null. The default value is a hyphen (-).

To learn more, refer to Configure standard options.

Data links allow you to link to other panels, dashboards, and external resources while maintaining the context of the source panel. You can create links that include the series name or even the value under the cursor.

For each data link, set the following options:

  • Title
  • URL
  • Open in new tab

To learn more, refer to Configure data links.

Value mappings

Value mapping is a technique you can use to change how data appears in a visualization.

For each value mapping, set the following options:

  • Condition - Choose what’s mapped to the display text and (optionally) color:
    • Value - Specific values
    • Range - Numerical ranges
    • Regex - Regular expressions
    • Special - Special values like Null, NaN (not a number), or boolean values like true and false
  • Display text
  • Color (Optional)
  • Icon (Canvas only)

To learn more, refer to Configure value mappings.

Thresholds

A threshold is a value or limit you set for a metric that’s reflected visually when it’s met or exceeded. Thresholds are one way you can conditionally style and color your visualizations based on query results.

For each threshold, set the following options:

OptionDescription
ValueSet the value for each threshold.
Thresholds modeChoose from Absolute and Percentage.

To learn more, refer to Configure thresholds.

Field overrides

Overrides allow you to customize visualization settings for specific fields or series. When you add an override rule, it targets a particular set of fields and lets you define multiple options for how that field is displayed.

Choose from the following override options:

OptionDescription
Fields with nameSelect a field from the list of all available fields.
Field with name matching regexSpecify fields to override with a regular expression.
Fields with typeSelect fields by type, such as string, numeric, or time.
Fields returned by querySelect all fields returned by a specific query, such as A, B, or C.
Fields with valuesSelect all fields returned by your defined reducer condition, such as Min, Max, Count, Total.

To learn more, refer to Configure field overrides.