Commit 5d77d96d by Diana Payton Committed by GitHub

Docs: 7.2 filter options (#27689)

* Update field-options.md

* Update menu.yaml

* Create _index.md

* Update _index.md

* added files

* moving content

* updated links

* fixed links and deleted old file

* content changes

* Update configure-all-fields.md

* Content updates

* contnet updates

* updated content

* Update whats-new-in-v7-2.md

* content updates

* added content

* Update filter-table-columns.md

* Update standard-field-options.md

* moved files

* content edits

* Update _index.md

* Update _index.md

* fixed links and merge conflicts

* Update menu.yaml

* Update menu.yaml
parent 08147e19
...@@ -38,7 +38,7 @@ For more information, refer to [@grafana/toolkit](https://www.npmjs.com/package/ ...@@ -38,7 +38,7 @@ For more information, refer to [@grafana/toolkit](https://www.npmjs.com/package/
### Field options ### Field options
Grafana 7.0 introduced the concept of [_field options_]({{< relref "../../panels/field-options.md#field-options" >}}), a new way of configuring your data before it gets visualized. Since this was not available in previous versions, any plugin that enables field-based configuration will not work in previous versions of Grafana. Grafana 7.0 introduced the concept of [_field options_]({{< relref "../../panels/field-options/_index.md#field-options" >}}), a new way of configuring your data before it gets visualized. Since this was not available in previous versions, any plugin that enables field-based configuration will not work in previous versions of Grafana.
For plugins prior to Grafana 7.0, all options are considered _Display options_. The tab for field configuration isn't available. For plugins prior to Grafana 7.0, all options are considered _Display options_. The tab for field configuration isn't available.
......
...@@ -91,7 +91,7 @@ view.forEach(row => { ...@@ -91,7 +91,7 @@ view.forEach(row => {
## Display values from a data frame ## Display values from a data frame
[Field options]({{< relref "../../panels/field-options.md" >}}) let the user control how Grafana displays the data in a data frame. [Field options]({{< relref "../../panels/field-options/_index.md" >}}) let the user control how Grafana displays the data in a data frame.
To apply the field options to a value, use the `display` method on the corresponding field. The result contains information such as the color and suffix to use when display the value. To apply the field options to a value, use the `display` method on the corresponding field. The result contains information such as the color and suffix to use when display the value.
......
...@@ -289,7 +289,7 @@ The default display name format is: ...@@ -289,7 +289,7 @@ The default display name format is:
`metricName{dimensionName=dimensionValue,dimensionTwoName=DimensionTwoValue}` `metricName{dimensionName=dimensionValue,dimensionTwoName=DimensionTwoValue}`
This can be customized by using the [display name field option]({{< relref "../../panels/field-options.md#display-name" >}}). This can be customized by using the [display name field option]({{< relref "../../panels/field-options/_index.md#display-name" >}}).
### Azure Log Analytics macros ### Azure Log Analytics macros
......
...@@ -90,7 +90,7 @@ Up until now the overrides were available only for Graph and Table panel(via Col ...@@ -90,7 +90,7 @@ Up until now the overrides were available only for Graph and Table panel(via Col
This feature enables even more powerful visualizations and fine grained control over how the data is displayed. This feature enables even more powerful visualizations and fine grained control over how the data is displayed.
Learn more about this feature in [Field options]({{< relref "../panels/field-options.md" >}}). Learn more about this feature in [Field options]({{< relref "../panels/field-options/_index.md" >}}).
## Inspect panels and export data to CSV ## Inspect panels and export data to CSV
......
...@@ -69,11 +69,13 @@ You can now dynamically apply value filters to any table column. This option is ...@@ -69,11 +69,13 @@ You can now dynamically apply value filters to any table column. This option is
{{< docs-imagebox img="/img/docs/v72/table_column_filters.png" max-width="800px" caption="Table column filters" >}} {{< docs-imagebox img="/img/docs/v72/table_column_filters.png" max-width="800px" caption="Table column filters" >}}
[Filter table columns]({{< relref "../panels/visualizations/table/filter-table-columns.md" >}}) has been added as a result of this feature.
### New field override selection options ### New field override selection options
You can now add override rules that use a regex matcher to choose which fields to apply rules to. You can now add override rules that use a regex matcher to choose which fields to apply rules to.
The [Field options]({{< relref "../panels/field-options.md" >}}) content has been updated as a result of these changes. The [Field options]({{< relref "../panels/field-options/_index.md" >}}) content and [Configure specific fields]({{< relref "../panels/field-options/configure-specific-fields.md" >}}) have been updated as a result of these changes.
## New transformations and enhancements ## New transformations and enhancements
......
...@@ -12,7 +12,7 @@ Data links allow you to provide more granular context to your links. You can cre ...@@ -12,7 +12,7 @@ Data links allow you to provide more granular context to your links. You can cre
The link itself is accessible in different ways depending on the visualization. For the graph you need to click on a data point or line, for a panel like The link itself is accessible in different ways depending on the visualization. For the graph you need to click on a data point or line, for a panel like
Stat, Gauge, or Bar Gauge you can click anywhere on the visualization to open the context menu. Stat, Gauge, or Bar Gauge you can click anywhere on the visualization to open the context menu.
>**Note:** For stat, gauge, bar gauge, and table visualizations, you add and edit data links on the Field tab. For the graph visualization, you add and edit data links on the Panel tab. > **Note:** For stat, gauge, bar gauge, and table visualizations, you add and edit data links on the Field tab. For the graph visualization, you add and edit data links on the Panel tab.
You can use variables in data links to send people to a detailed dashboard with preserved data filters. For example, you could use variables to specify a time range, series, and variable selection. For more information, refer to [Data link variables]({{< relref "data-link-variables.md" >}}). You can use variables in data links to send people to a detailed dashboard with preserved data filters. For example, you could use variables to specify a time range, series, and variable selection. For more information, refer to [Data link variables]({{< relref "data-link-variables.md" >}}).
......
...@@ -173,7 +173,16 @@ ...@@ -173,7 +173,16 @@
- link: /panels/transformations/types-options/ - link: /panels/transformations/types-options/
name: Transformation types and options name: Transformation types and options
- link: /panels/field-options/ - link: /panels/field-options/
name: Field options name: Field options and overrides
children:
- link: /panels/field-options/
name: Overview
- link: /panels/field-options/configure-all-fields/
name: Configure all fields
- link: /panels/field-options/configure-specific-fields/
name: Configure specific fields
- link: /panels/field-options/standard-field-options/
name: Standard field options
- link: /panels/panel-editor/ - link: /panels/panel-editor/
name: Panel editor name: Panel editor
- name: Visualizations - name: Visualizations
...@@ -199,6 +208,13 @@ ...@@ -199,6 +208,13 @@
name: Stat name: Stat
- link: /panels/visualizations/table-panel/ - link: /panels/visualizations/table-panel/
name: Table name: Table
children:
- name: Overview
link: /panels/visualizations/table/
- link: /panels/visualizations/table/table-field-options/
name: Table field options
- link: /panels/visualizations/tables/filter-table-columns/
name: Filter table columns
- link: /panels/visualizations/text-panel/ - link: /panels/visualizations/text-panel/
name: Text name: Text
- link: /panels/thresholds/ - link: /panels/thresholds/
...@@ -230,7 +246,7 @@ ...@@ -230,7 +246,7 @@
name: Export and import name: Export and import
- link: /dashboards/dashboard_history/ - link: /dashboards/dashboard_history/
name: Dashboard version history name: Dashboard version history
- name: Keyboard Shortcuts - name: Keyboard shortcuts
link: /features/shortcuts/ link: /features/shortcuts/
- name: Reporting - name: Reporting
link: /features/reporting/ link: /features/reporting/
......
...@@ -59,6 +59,7 @@ Our Grafana Fundamentals tutorial is a great place to start, or you can learn mo ...@@ -59,6 +59,7 @@ Our Grafana Fundamentals tutorial is a great place to start, or you can learn mo
- Learn more about [panel editor]({{< relref "panel-editor.md" >}}) options. - Learn more about [panel editor]({{< relref "panel-editor.md" >}}) options.
- Add more [queries]({{< relref "queries.md" >}}). - Add more [queries]({{< relref "queries.md" >}}).
- [Transform]({{< relref "transformations/_index.md" >}}) your data. - [Transform]({{< relref "transformations/_index.md" >}}) your data.
- [Configure]({{< relref "field-options.md" >}}) how your results are displayed in the visualization. - [Configure]({{< relref "field-options/_index.md" >}}) how your results are displayed in the visualization.
- If you made a graph panel, set up an [alert]({{< relref "../alerting/alerts-overview.md" >}}). - If you made a graph panel, set up an [alert]({{< relref "../alerting/alerts-overview.md" >}}).
- Create [templates and variables]({{< relref "../variables/templates-and-variables.md" >}}). - Create [templates and variables]({{< relref "../variables/templates-and-variables.md" >}}).
+++
title = "Field options and overrides"
type = "docs"
keywords = ["grafana", "field options", "documentation", "format fields"]
aliases = ["/docs/grafana/latest/panels/field-configuration-options/", "/docs/grafana/latest/panels/field-options/"]
[menu.docs]
weight = 500
+++
# Field options and overrides
This section explains what field options and field overrides in Grafana are and how to use them. It also includes [examples](#examples) if you need an idea of how this feature might be useful in the real world.
The data model used in Grafana, the [data frame]({{< relref "../../developers/plugins/data-frames.md" >}}), is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a _field_. A field can represent a single time series or table column.
Field options allow you to change how the data is displayed in your visualizations. Options and overrides that you apply do not change the data, they change how Grafana displays the data.
## Field options
_Field options_, both standard and custom, can be found in the Field tab in the panel editor. Changes on this tab apply to all fields (i.e. series/columns). For example, if you change the unit to percentage, then all fields with numeric values are displayed in percentages. Learn how to apply a field option in [Configure all fields](configure-all-fields.md).
## Field overrides
_Field overrides_ can be added in the Overrides tab in the panel editor. There you can add the same options as you find in the Field tab, but they are only applied to specific fields. Learn how to apply an override in [Configure specific fields](configure-specific-fields.md).
## Available field options and overrides
Field option types are common to both field options and field overrides. The only difference is whether the change will apply to all fields (apply in the Field tab) or to a subset of fields (apply in the Overrides tab).
- [Standard field options]({{< relref "standard-field-options.md" >}}) apply to all panel visualizations that allow transformations.
- [Table field options]({{< relref "../visualizations/table/table-field-options.md" >}}), which only apply to table panel visualizations.
## Examples
Here are some examples of how you might use this feature:
- [Field option example]({{< relref "configure-all-fields.md#field-option-example" >}})
- [Field override example]({{< relref "configure-specific-fields.md#field-override-example" >}})
+++
title = "Configure all fields"
keywords = ["grafana", "field options", "documentation", "format fields", "change all fields"]
type = "docs"
weight = 200
+++
# Configure all fields
To change how all fields display data, you can change an option in the Field tab. In the Overrides tab, you can then override the field options for [specific fields]({{< relref "configure-specific-fields.md" >}}).
For example, you could change the number of decimal places shown in all fields by changing the **Decimals** option. For more information about options, refer to:
- [Standard field options]({{< relref "standard-field-options.md" >}}), apply to all visualizations that allow transformations.
- [Table field options]({{< relref "../visualizations/table/table-field-options.md" >}}), which only apply to table panel visualizations.
## Change a field option
You can change as many options as you want to.
1. Navigate to the panel you want to edit, click the panel title, and then click **Edit**.
1. Click the **Field** tab.
1. Find the option you want to change. You can define:
- [Standard field options]({{< relref "standard-field-options.md" >}}), which apply to all panel visualizations that allow transformations.
- [Table field options]({{< relref "../visualizations/table/table-field-options.md" >}}), which only apply to table panel visualizations.
1. Add options by adding values in the fields. To return options to default values, delete the white text in the fields.
1. When finished, click **Save** to save all panel edits to the dashboard.
## Field option example
Let’s assume that our result set is a data frame that consists of two fields: time and temperature.
| time | temperature |
| :-----------------: | :---------: |
| 2020-01-02 03:04:00 | 45.0 |
| 2020-01-02 03:05:00 | 47.0 |
| 2020-01-02 03:06:00 | 48.0 |
Each field (column) of this structure can have field options applied that alter the way its values are displayed. This means that you can, for example, set the Unit to Temperature > Celsius, resulting in the following table:
| time | temperature |
| :-----------------: | :---------: |
| 2020-01-02 03:04:00 | 45.0 °C |
| 2020-01-02 03:05:00 | 47.0 °C |
| 2020-01-02 03:06:00 | 48.0 °C |
While we're at it, the decimal place doesn't add anything to this display. You can change the Decimals from `auto` to zero (`0`), resulting in the following table:
| time | temperature |
| :-----------------: | :---------: |
| 2020-01-02 03:04:00 | 45 °C |
| 2020-01-02 03:05:00 | 47 °C |
| 2020-01-02 03:06:00 | 48 °C |
+++
title = "Configure specific fields"
keywords = ["grafana", "field options", "documentation", "format fields", "overrides", "override fields"]
type = "docs"
weight = 300
+++
# Configure specific fields
Overrides allow you to change the settings for one or more fields. Field options for overrides are exactly the same as the field options available in a particular visualization. The only difference is that you choose which fields to apply them to.
For example, you could change the number of decimal places shown in all numeric fields or columns by changing the **Decimals** option for **Fields with type** that matches **Numeric**. For more information about options, refer to:
- [Standard field options]({{< relref "standard-field-options.md" >}}), which apply to all panel visualizations that allow transformations.
- [Table field options]({{< relref "table-field-options.md" >}}), which only apply to table panel visualizations.
## Add a field override
You can override as many field options as you want to.
1. Navigate to the panel you want to edit, click the panel title, and then click **Edit**.
1. Click the **Overrides** tab.
1. Click **Add an override for**.
1. Select which fields an override rule will be applied to:
- **Fields with name -** Allows you to select a field from the list of all available fields. Properties you add to a rule with this selector are only applied to this single field.
- **Fields with name matching regex -** Allows you to specify fields to override with a regular expression. Properties you add to a rule with this selector are applied to all fields where the field name match the regex.
- **Fields with type -** Allows you to select fields by type, such as string, numeric, and so on. Properties you add to a rule with this selector are applied to all fields that match the selected type.
1. Click **Add override property**.
1. Select the field option that you want to apply.
- [Standard field options]({{< relref "standard-field-options.md" >}}), which apply to all panel visualizations that allow transformations.
- [Table field options]({{< relref "table-field-options.md" >}}), which only apply to table panel visualizations.
1. Enter options by adding values in the fields. To return options to default values, delete the white text in the fields.
1. Continue to add overrides to this field by clicking **Add override property**, or you can click **Add override** and select a different field to add overrides to.
1. When finished, click **Save** to save all panel edits to the dashboard.
## Delete a field override
1. Navigate to the Overrides tab that contains the override that you want to delete.
1. Click the trash can icon next to the override.
## Field override example
Let’s assume that our result set is a data frame that consists of four fields: time, high temp, low temp, and humidity.
| time | high temp | low temp | humidity |
| ------------------- | --------- | -------- | -------- |
| 2020-01-02 03:04:00 | 45.0 | 30.0 | 67 |
| 2020-01-02 03:05:00 | 47.0 | 34.0 | 68 |
| 2020-01-02 03:06:00 | 48.0 | 31.0 | 68 |
Let's apply the field options from the [field option example]({{< relref "configure-all-fields.md#field-option-example" >}}) to apply the Celsius unit and get rid of the decimal place. This results in the following table:
| time | high temp | low temp | humidity |
| ------------------- | --------- | -------- | -------- |
| 2020-01-02 03:04:00 | 45 °C | 30 °C | 67 °C |
| 2020-01-02 03:05:00 | 47 °C | 34 °C | 68 °C |
| 2020-01-02 03:06:00 | 48 °C | 31 °C | 68 °C |
The temperature fields look good, but the humidity is nonsensical. We can fix this by applying a field option override to the humidity field and change the unit to Misc > percent (0-100). This results in a table that makes a lot more sense:
| time | high temp | low temp | humidity |
| ------------------- | --------- | -------- | -------- |
| 2020-01-02 03:04:00 | 45 °C | 30 °C | 67% |
| 2020-01-02 03:05:00 | 47 °C | 34 °C | 68% |
| 2020-01-02 03:06:00 | 48 °C | 31 °C | 68% |
+++
title = "Standard field options"
keywords = ["grafana", "table options", "documentation", "format tables"]
type = "docs"
weight = 400
+++
# Standard field options
This section explains all available field options. They are listed in alphabetical order.
You can apply standard field options to most built-in Grafana panels. Some older panels and community panels that have not updated to the new panel and data model will be missing either all or some of these field options.
Most field options will not affect the visualization until you click outside of the field option box you are editing or press Enter.
For more information about applying these options, refer to:
- [Configure all fields]({{< relref "configure-all-fields.md" >}})
- [Configure specific fields]({{< relref "configure-specific-fields.md" >}})
## Decimals
Number of decimals to render value with. Leave empty for Grafana to use the number of decimals provided by the data source.
To change this setting, type a number in the field and then click outside the field or press Enter.
## Data links
Lets you control the URL to which a value or visualization link.
For more information and instructions, refer to [Data links]({{< relref "../../linking/data-links.md" >}}).
## Display name
Lets you set the display title of all fields. You can use [variables]({{< relref "../../variables/templates-and-variables.md" >}}) in the field title.
When multiple stats, fields, or series are shown, this field controls the title in each stat. You can use expressions like `${__field.name}` to use only the series name or the field name in title.
Given a field with a name of Temp, and labels of {"Loc"="PBI", "Sensor"="3"}
| Expression syntax | Example | Renders to | Explanation |
| ---------------------------- | ----------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `${__field.displayName}` | Same as syntax | `Temp {Loc="PBI", Sensor="3"}` | Displays the field name, and labels in `{}` if they are present. If there is only one label key in the response, then for the label portion, Grafana displays the value of the label without the enclosing braces. |
| `${__field.name}` | Same as syntax | `Temp` | Displays the name of the field (without labels). |
| `${__field.labels}` | Same as syntax | `Loc="PBI", Sensor="3"` | Displays the labels without the name. |
| `${__field.labels.X}` | `${__field.labels.Loc}` | `PBI` | Displays the value of the specified label key. |
| `${__field.labels.__values}` | Same as Syntax | `PBI, 3` | Displays the values of the labels separated by a comma (without label keys). |
If the value is an empty string after rendering the expression for a particular field, then the default display method is used.
## Max
Lets you set the maximum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields
## Min
Lets you set the minimum value used in percentage threshold calculations. Leave blank for auto calculation based on all series and fields
## No value
Enter what Grafana should display if the field value is empty or null.
## Unit
Lets you choose what unit a field should use. Click in the **Unit** field, then drill down until you find the unit you want. The unit you select is applied to all fields except time.
### Custom units
You can use the unit dropdown to also specify custom units, custom prefix or suffix and date time formats.
To select a custom unit enter the unit and select the last `Custom: xxx` option in the dropdown.
- If y u want a space -> If you want a space
- `suffix:<suffix>` for custom unit that should go after value.
- `time:<format>` For custom date time formats type for example `time:YYYY-MM-DD`. See [formats](https://momentjs.com/docs/#/displaying/) for the format syntax and options.
- `si:<base scale><unit characters>` for custom SI units. For example: `si: mF`. This one is a bit more advanced as you can specify both a unit and the
source data scale. So if your source data is represented as milli (thousands of) something prefix the unit with that
SI scale character.
- `count:<unit>` for a custom count unit.
- `currency:<unit>` for custom a currency unit.
You can also paste a native emoji in the unit picker and pick it as a custom unit:
{{< docs-imagebox img="/img/docs/v66/custom_unit_burger2.png" max-width="600px" caption="Custom unit emoji" >}}
### String units
Grafana can sometime be too aggressive in parsing strings and displaying them as numbers. To make Grafana show the original string create a field override and add a unit property with the `string` unit.
## Thresholds
Thresholds allow you to change the color of a field based on the value.
For more information and instructions, refer to [Thresholds]({{< relref "../thresholds.md" >}}).
## Value mapping
Lets you set rules that translate a field value or range of values into explicit text. You can add more than one value mapping.
- **Mapping type -** Click an option.
- **Value -** Enter a value. If the field value is greater than or equal to the value, then the **Text** is displayed.
- **From** and **To -** Enter a range. If the field value is between or equal to the values in the range, then the **Text** is displayed.
- **Text -** Text that is displayed if the conditions are met in a field. This field accepts variables.
...@@ -72,5 +72,5 @@ Features in these tabs are documented in the following topics: ...@@ -72,5 +72,5 @@ Features in these tabs are documented in the following topics:
- [Add a panel]({{< relref "add-a-panel.md" >}}) describes basic panel settings. - [Add a panel]({{< relref "add-a-panel.md" >}}) describes basic panel settings.
- [Visualizations]({{< relref "visualizations/_index.md" >}}) display options vary widely. They are described in the individual visualization topic. - [Visualizations]({{< relref "visualizations/_index.md" >}}) display options vary widely. They are described in the individual visualization topic.
- [Field options and overrides]({{< relref "field-options.md" >}}) allow you to control almost every aspect of your visualization, including units, value mappings, and [Thresholds]({{< relref "thresholds.md" >}}). - [Field options and overrides]({{< relref "field-options/_index.md" >}}) allow you to control almost every aspect of your visualization, including units, value mappings, and [Thresholds]({{< relref "thresholds.md" >}}).
- [Panel links]({{< relref "../linking/panel-links.md" >}}) and [Data links]({{< relref "../linking/data-links.md" >}}) help you connect your visualization to other resources. - [Panel links]({{< relref "../linking/panel-links.md" >}}) and [Data links]({{< relref "../linking/data-links.md" >}}) help you connect your visualization to other resources.
...@@ -21,7 +21,7 @@ You can apply thresholds to the following visualizations: ...@@ -21,7 +21,7 @@ You can apply thresholds to the following visualizations:
- [Gauge]({{< relref "visualizations/gauge-panel.md" >}}) - [Gauge]({{< relref "visualizations/gauge-panel.md" >}})
- [Graph]({{< relref "visualizations/graph-panel.md" >}}) - [Graph]({{< relref "visualizations/graph-panel.md" >}})
- [Stat]({{< relref "visualizations/stat-panel.md" >}}) - [Stat]({{< relref "visualizations/stat-panel.md" >}})
- [Table]({{< relref "visualizations/table-panel.md" >}}) - [Table]({{< relref "visualizations/table/_index.md" >}})
## Default thresholds ## Default thresholds
......
...@@ -37,7 +37,7 @@ Before you apply transformations, all of the following must be true: ...@@ -37,7 +37,7 @@ Before you apply transformations, all of the following must be true:
- [Heatmap]({{< relref "visualizations/heatmap.md" >}}) - [Heatmap]({{< relref "visualizations/heatmap.md" >}})
- [Logs]({{< relref "visualizations/logs-panel.md" >}}) - [Logs]({{< relref "visualizations/logs-panel.md" >}})
- [Stat]({{< relref "visualizations/stat-panel.md" >}}) - [Stat]({{< relref "visualizations/stat-panel.md" >}})
- [Table]({{< relref "visualizations/table-panel.md" >}}) - [Table]({{< relref "visualizations/table/_index.md" >}})
## Apply a transformation ## Apply a transformation
......
...@@ -36,4 +36,4 @@ Before you can configure and apply transformations: ...@@ -36,4 +36,4 @@ Before you can configure and apply transformations:
- [Heatmap]({{< relref "../visualizations/heatmap.md" >}}) - [Heatmap]({{< relref "../visualizations/heatmap.md" >}})
- [Logs]({{< relref "../visualizations/logs-panel.md" >}}) - [Logs]({{< relref "../visualizations/logs-panel.md" >}})
- [Stat]({{< relref "../visualizations/stat-panel.md" >}}) - [Stat]({{< relref "../visualizations/stat-panel.md" >}})
- [Table]({{< relref "../visualizations/table-panel.md" >}})ß - [Table]({{< relref "../visualizations/table/_index.md" >}})
...@@ -44,7 +44,7 @@ After I apply the transformation, there is no time value and each column has bee ...@@ -44,7 +44,7 @@ After I apply the transformation, there is no time value and each column has bee
> **Note:** This transformation is only available in Grafana 7.1+. > **Note:** This transformation is only available in Grafana 7.1+.
Use this transformation to combine the result from multiple queries into one single result. This is helpful when using the table panel visualization. Values that can be merged are combined into the same row. Values are mergeable if the shared fields contains the same data. For information, refer to [Table panel]({{< relref "../visualizations/table-panel.md" >}}). Use this transformation to combine the result from multiple queries into one single result. This is helpful when using the table panel visualization. Values that can be merged are combined into the same row. Values are mergeable if the shared fields contains the same data. For information, refer to [Table panel]({{< relref "../visualizations/table/_index.md" >}}).
In the example below, we have two queries returning table data. It is visualized as two separate tables before applying the transformation. In the example below, we have two queries returning table data. It is visualized as two separate tables before applying the transformation.
......
...@@ -20,7 +20,7 @@ This panel can show one or more bar gauges depending on how many series, rows, o ...@@ -20,7 +20,7 @@ This panel can show one or more bar gauges depending on how many series, rows, o
Bar gauge visualizations allow you to apply: Bar gauge visualizations allow you to apply:
- [Data transformations]({{< relref "../transformations/_index.md" >}}) - [Data transformations]({{< relref "../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../field-options.md" >}}) - [Field options and overrides]({{< relref "../field-options/_index.md" >}})
- [Thresholds]({{< relref "../thresholds.md" >}}) - [Thresholds]({{< relref "../thresholds.md" >}})
## Display options ## Display options
......
...@@ -18,7 +18,7 @@ Gauge is a single value panel that can repeat a gauge for every series, column o ...@@ -18,7 +18,7 @@ Gauge is a single value panel that can repeat a gauge for every series, column o
Gauge visualizations allow you to apply: Gauge visualizations allow you to apply:
- [Data transformations]({{< relref "../transformations/_index.md" >}}) - [Data transformations]({{< relref "../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../field-options.md" >}}) - [Field options and overrides]({{< relref "../field-options/_index.md" >}})
- [Thresholds]({{< relref "../thresholds.md" >}}) - [Thresholds]({{< relref "../thresholds.md" >}})
## Display options ## Display options
......
...@@ -20,7 +20,7 @@ The Stat panel shows a one large stat value with an optional graph sparkline. Yo ...@@ -20,7 +20,7 @@ The Stat panel shows a one large stat value with an optional graph sparkline. Yo
Stat visualizations allow you to apply: Stat visualizations allow you to apply:
- [Data transformations]({{< relref "../transformations/_index.md" >}}) - [Data transformations]({{< relref "../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../field-options.md" >}}) - [Field options and overrides]({{< relref "../field-options/_index.md" >}})
- [Thresholds]({{< relref "../thresholds.md" >}}) - [Thresholds]({{< relref "../thresholds.md" >}})
## Automatic layout adjustment ## Automatic layout adjustment
......
+++
title = "Table panel"
keywords = ["grafana", "dashboard", "documentation", "panels", "table panel"]
type = "docs"
aliases = ["/docs/grafana/latest/reference/table/", "/docs/grafana/latest/features/panels/table_panel/"]
[menu.docs]
name = "Table panel"
parent = "visualizations"
weight = 1000
+++
# Table panel
The table panel is very flexible, supporting multiple modes for time series and for tables, annotation, and raw JSON data. This panel also provides date formatting, value formatting, and coloring options.
{{< figure src="/img/docs/v72/table_visualization.png" max-width="1200px" lightbox="true" caption="Table visualization" >}}
## Data and field options
Table visualizations allow you to apply:
- [Data transformations]({{< relref "../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../field-options.md" >}})
- [Thresholds]({{< relref "../thresholds.md" >}})
## Display options
- **Show header -** Show or hide column names imported from your data source..
### Field display options
In the **Field** tab you can set table specific display options that will affect all columns. In the **Override** tab you can customize them per column.
- [Column width](#column-width)
- [Column alignment](#column-alignment)
- [Cell display mode](#cell-display-mode)
### Column alignment
Choose how Grafana should align cell contents:
- Auto (default)
- Left
- Center
- Right
### Column width
By default, Grafana automatically calculates the column width based on the cell contents. In this field option, can override the setting and define the width for all columns in pixels.
For example, if you enter `100` in the field, then when you click outside the field, all the columns will be set to 100 pixels wide.
#### Cell display mode
By default, Grafana automatically chooses display settings. You can override the settings by choosing one of the following options to change all fields.
- **Color text -** If thresholds are set, then the field text is displayed in the appropriate threshold color.
- **Color background -** If thresholds are set, then the field background is displayed in the appropriate threshold color.
- **Gradient gauge -** The threshold levels define a gradient.
- **LCD gauge -** The gauge is split up in small cells that are lit or unlit.
- **JSON view -** Shows value formatted as code. If a value is an object the JSON view allowing browsing the JSON object will appear on hover
## Tips
### Display original string value
Grafana can sometime be too aggressive in parsing strings and displaying them as numbers. To make Grafana show the original
string create a field override and add a unit property with the `string` unit.
### Annotations
Annotations are not currently supported in the new table panel. This might be added back in a future release.
+++
title = "Table panel"
keywords = ["grafana", "dashboard", "documentation", "panels", "table panel"]
type = "docs"
aliases = ["/docs/grafana/latest/reference/table/", "/docs/grafana/latest/features/panels/table_panel/"]
[menu.docs]
name = "Table panel"
parent = "visualizations"
weight = 1000
+++
# Table panel
The table panel is very flexible, supporting multiple modes for time series and for tables, annotation, and raw JSON data. This panel also provides date formatting, value formatting, and coloring options.
{{< docs-imagebox img="/img/docs/tables/table_visualization.png" max-width="1200px" lightbox="true" caption="Table visualization" >}}
## Data and field options
Table visualizations allow you to apply:
- [Data transformations]({{< relref "../../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../../field-options/_index.md" >}})
- [Thresholds]({{< relref "../../thresholds.md" >}})
## Display options
> **Note:** If you are using a table visualization created before Grafana 7.0, then you need to migrate to the new table version in order to see these options. To migrate, on the Panel tab, click **Table** visualization. Grafana updates the table version and you can then access all table options.
- **Show header -** Show or hide column names imported from your data source.
- **Sort ascending/descending -** 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 only sort by one column at a time.
{{< docs-imagebox img="/img/docs/tables/sort-descending.png" max-width="500px" caption="Sort descending" class="docs-image--no-shadow" >}}
- [Table field options]({{< relref "table-field-options.md" >}}) allow you to change [field options]({{< relref "../../field-options/_index.md" >}}) such as column width, alignment, and cell display mode.
- [Filter table columns]({{< relref "filter-table-columns.md" >}}) - You can temporarily change how column data is displayed. For example, you can order values from highest to lowest or hide specific values.
## Annotation support
Annotations are not currently supported in the new table panel. This might be added back in a future release.
+++
title = "Filter table columns"
keywords = ["grafana", "table options", "documentation", "format tables", "table filter", "filter columns"]
type = "docs"
weight = 600
+++
# Filter table columns
> **Note:** This feature is available in Grafana 7.2+.
If you turn on the **Column filter** in [Table options]({{< relref "table-field-options.md" >}}), then you can filter table options.
## Turn on column filtering
1. In Grafana, navigate to the dashboard with the table with the columns that you want to filter.
1. On the table panel you want to filter, [open the panel editor]({{< relref "../../panel-editor.md#open-the-panel-editor" >}}).
1. Click the **Field** tab.
1. In Table options, turn on the **Column filter** option.
A filter icon appears next to each column title.
{{< docs-imagebox img="/img/docs/tables/column-filter-with-icon.png" max-width="500px" caption="Column filtering turned on" class="docs-image--no-shadow" >}}
## Filter column values
To filter column values, click the filter (funnel) icon next to a column title. Grafana displays the filter options for that column.
{{< docs-imagebox img="/img/docs/tables/filter-column-values.png" max-width="500px" caption="Filter column values" class="docs-image--no-shadow" >}}
Click the check box next to the values that you want to display. 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.
## Clear column filters
Columns with filters applied have a blue funnel displayed next to the title.
{{< docs-imagebox img="/img/docs/tables/filtered-column.png" max-width="500px" caption="Filtered column" class="docs-image--no-shadow" >}}
To remove the filter, click the blue funnel icon and then click **Clear filter**.
\ No newline at end of file
+++
title = "Table field options"
keywords = ["grafana", "table options", "documentation", "format tables"]
type = "docs"
weight = 500
+++
# Table field options
This section explains all available table field options. They are listed in the same order as in Grafana. Options listed in this topic apply only to table panel visualizations.
Most field options will not affect the visualization until you click outside of the field option box you are editing or press Enter.
For more information about applying these options, refer to:
- [Configure all fields]({{< relref "../../field-options/configure-all-fields.md" >}})
- [Configure specific fields]({{< relref "../../field-options/configure-specific-fields.md" >}})
## Column alignment
Choose how Grafana should align cell contents:
- Auto (default)
- Left
- Center
- Right
## Column width
By default, Grafana automatically calculates the column width based on the cell contents. In this field option, can override the setting and define the width for all columns in pixels.
For example, if you enter `100` in the field, then when you click outside the field, all the columns will be set to 100 pixels wide.
## Cell display mode
By default, Grafana automatically chooses display settings. You can override the settings by choosing one of the following options to change all fields.
> **Note:** If you set these in the Field tab, then the display modes will apply to all fields, including the time field. Many options will work best if you set them in the Override tab.
### Color text
If thresholds are set, then the field text is displayed in the appropriate threshold color.
{{< docs-imagebox img="/img/docs/tables/color-text.png" max-width="500px" caption="Color text" class="docs-image--no-shadow" >}}
### Color background
If thresholds are set, then the field background is displayed in the appropriate threshold color.
{{< docs-imagebox img="/img/docs/tables/color-background.png" max-width="500px" caption="Color background" class="docs-image--no-shadow" >}}
### Gradient gauge
The threshold levels define a gradient.
{{< docs-imagebox img="/img/docs/tables/gradient-gauge.png" max-width="500px" caption="Gradient gauge" class="docs-image--no-shadow" >}}
### LCD gauge
The gauge is split up in small cells that are lit or unlit.
{{< docs-imagebox img="/img/docs/tables/lcd-gauge.png" max-width="500px" caption="LCD gauge" class="docs-image--no-shadow" >}}
### JSON view
Shows value formatted as code. If a value is an object the JSON view allowing browsing the JSON object will appear on hover.
{{< docs-imagebox img="/img/docs/tables/json-view.png" max-width="500px" caption="JSON view" class="docs-image--no-shadow" >}}
## Column filter
> **Note:** This feature is available in Grafana 7.2+.
>
Turn this on to enable table field filters. For more information, refer to [Filter table columns]({{< relref "filter-table-columns.md" >}}).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment