Skip to content

Commit

Permalink
Docs: Override content (grafana#34859)
Browse files Browse the repository at this point in the history
* content updates

* Update panel-editor.md

* Update panel-editor.md

* content updates

* edits

* Update field-overrides.md

* Delete field-options-and-overrides.md

* link updates

* Update field-overrides.md

* Update field-overrides.md

* Update field-overrides.md

* fixing links

* reordering

* Update docs/sources/panels/field-overrides.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/panels/panel-editor.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/panels/panel-editor.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/panels/panel-editor.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/panels/panel-editor.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/panels/visualizations/table/_index.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/panels/visualizations/table/_index.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
  • Loading branch information
oddlittlebird and achatterjee-grafana authored May 28, 2021
1 parent b391e43 commit 66e2624
Show file tree
Hide file tree
Showing 27 changed files with 105 additions and 161 deletions.
2 changes: 1 addition & 1 deletion docs/sources/datasources/azuremonitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ The default display name format is:

`metricName{dimensionName=dimensionValue,dimensionTwoName=DimensionTwoValue}`

This can be customized by using the [display name field option]({{< relref "../panels/field-options/_index.md#display-name" >}}).
This can be customized by using the [display name field option]({{< relref "../panels/standard-options.md#display-name" >}}).

### Logs macros

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/developers/plugins/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ For more information, refer to [@grafana/toolkit](https://www.npmjs.com/package/

### Field options

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.
Grafana 7.0 introduced the concept of _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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ view.forEach(row => {

## Display values from a data frame

[Field options]({{< relref "../../panels/field-options/_index.md" >}}) let the user control how Grafana displays the data in a data frame.
Field options 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.

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/panels/add-a-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ While not required, most visualizations need some adjustment before they properl
- [Thresholds]({{< relref "./thresholds.md" >}})
- [Value mappings]({{< relref "./value-mappings.md" >}})
- [Data links]({{< relref "../linking/data-links.md" >}})
- [Override fields]({{< relref "field-options/configure-specific-fields.md" >}})
- [Field overrides]({{< relref "./field-overrides.md" >}})

## 5. Apply changes and save

Expand Down
36 changes: 0 additions & 36 deletions docs/sources/panels/field-options/_index.md

This file was deleted.

51 changes: 0 additions & 51 deletions docs/sources/panels/field-options/configure-all-fields.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,41 +1,87 @@
+++
title = "Configure specific fields"
title = "Field overrides"
keywords = ["grafana", "field options", "documentation", "format fields", "overrides", "override fields"]
weight = 300
aliases = ["/docs/grafana/latest/panels/field-options/", "/docs/grafana/latest/panels/field-options/configure-specific-fields/"]
weight = 700
+++

# Configure specific fields
# Field overrides

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 options]({{< relref "../standard-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.
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**.

## View existing field overrides

1. Navigate to the panel you want to edit, click the panel title, and then click **Edit**.
1. In the side pane, click **Overrides**.

Grafana displays a list of field overrides, if any have been created for this panel.

![View overrides](/img/docs/time-series-panel/panel-editor-8-0.png)

## Add a field override

You can override as many field options as you want to.
You can override as many fields and add as many field options to each override 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. In the side pane, click **Overrides**.
1. Click **Add field override**.
1. Select which fields an override rule will be applied to:
- **Fields with name -** 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 -** 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 -** 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.
- **Fields returned by query -** Select all fields returned by a specific query, such as A, B, or C. Properties you add to a rule with this selector are applied to all fields returned by the selected query.
1. Click **Add override property**.
1. Select the field option that you want to apply.
- [Standard options]({{< relref "../standard-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. 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.

## Edit a field override

1. Navigate to the panel you want to edit, click the panel title, and then click **Edit**.
1. In the side pane, click **Overrides**.
1. Locate the override that you want to change. You can:
- Edit settings on existing overrides or field selection parameters.
- Delete existing override properties by clicking the **X** next to the property.
- Add additional override properties by clicking **Add override property**.

## 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.
1. Navigate to the panel you want to edit, click the panel title, and then click **Edit**.
1. In the side pane, click **Overrides**.
1. Click the trash can icon next to the override that you want to delete.

## Example use case for field options and overrides

The following examples show how you might use field options and overrides.

## 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 |

## Field override example

Expand All @@ -47,7 +93,7 @@ Let’s assume that our result set is a data frame that consists of four fields:
| 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:
Let's apply the field options from the [field option example](#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 |
| ------------------- | --------- | -------- | -------- |
Expand Down
32 changes: 25 additions & 7 deletions docs/sources/panels/panel-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ This page describes the parts of the Grafana panel editor and links to where you

{{< figure src="/static/img/docs/panel-editor/panel-editor-7-0.png" class="docs-image--no-shadow" max-width="1500px" >}}

## Open the Panel editor
If your user account is assigned the appropriate [organization role]({{< relref "../permissions/organization_roles.md" >}}) or [permissions]({{< relref "../permissions/_index.md" >}}), then you can edit or update a panel at any point after it is created. For more information about creating panels, refer to [Add a panel]({{< relref "./add-a-panel.md" >}}).

## Open the panel editor

There are several ways to access the panel editor, also called the **Edit Panel** screen, _edit mode_, or _panel edit mode_:

Expand Down Expand Up @@ -61,13 +63,29 @@ The section contains tabs where you enter queries, transform your data, and crea
- **Transform tab -** Apply data transformations. For more information, refer to [Transformations]({{< relref "transformations/_index.md" >}}).
- **Alert tab -** Write alert rules. For more information, refer to [Create alerts]({{< relref "../alerting/old-alerting/create-alerts.md" >}}).

### Panel and field options (side pane)
### Panel display options (side pane)

The section contains tabs where you configure almost every aspect of your data Visualization. Not all options are available for each visualization.

The data model used in Grafana, namely 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, however they change how Grafana displays the data.

#### Field options

When you change an option, it is applied to all fields, meaning all series or columns. For example, if you change the unit to percentage, then all fields with numeric values are displayed in percentages.

## Field overrides

The section contains tabs where you control almost every aspect of how your data is visualized. Not all tabs are available for each visualization.
_Field overrides_ can be added or viewed in the Overrides tab in the panel editor side menu. You can apply options to specific fields (series or columns) rather than all fields. Learn how to apply an override in [Field overrides]({{< relref "./field-overrides.md" >}}).

Features in these tabs are documented in the following topics:
Options are documented in the following topics:

- [Add a panel]({{< relref "add-a-panel.md" >}}) describes basic panel settings.
- [Visualization]({{< relref "visualizations/_index.md" >}}) options vary widely. They are described in the individual visualization topic.
- [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" >}}).
- [Add a panel]({{< relref "./add-a-panel.md" >}}) describes how to add a panel to a dashboard.
- [Panel options]({{< relref "./panel-options.md" >}})
- [Visualization options]({{< relref "visualizations/_index.md" >}}) vary widely. They are described in the individual visualization topic.
- [Standard options]({{< relref "./standard-options.md" >}})
- [Thresholds]({{< relref "./thresholds.md" >}})
- [Value mappings]({{< relref "./value-mappings.md" >}})
- [Panel links]({{< relref "../linking/panel-links.md" >}}) and [Data links]({{< relref "../linking/data-links.md" >}}) help you connect your visualization to other resources.
- [Overrides]({{< relref "./field-overrides.md" >}})
2 changes: 1 addition & 1 deletion docs/sources/panels/transformations/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "Transformations"
weight = 300
weight = 350
+++

# Transformations
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/panels/visualizations/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "Visualization options"
weight = 300
weight = 400
+++

# Visualization options
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/panels/visualizations/bar-gauge-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This panel can show one or more bar gauges depending on how many series, rows, o
Bar gauge visualizations allow you to apply:

- [Data transformations]({{< relref "../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../field-options/_index.md" >}})
- [Field overrides]({{< relref "../field-overrides.md" >}})
- [Thresholds]({{< relref "../thresholds.md" >}})

## Display options
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/panels/visualizations/gauge-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gauge is a single value panel that can repeat a gauge for every series, column o
Gauge visualizations allow you to apply:

- [Data transformations]({{< relref "../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../field-options/_index.md" >}})
- [Field overrides]({{< relref "../field-overrides.md" >}})
- [Thresholds]({{< relref "../thresholds.md" >}})

## Display options
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/panels/visualizations/graph-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Graph visualizations allow you to apply:

- [Alerts]({{< relref "../../alerting/_index.md" >}}) - This is the only type of visualization that allows you to set alerts.
- [Data transformations]({{< relref "../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../field-options/_index.md" >}})
- [Field overrides]({{< relref "../field-overrides.md" >}})
- [Thresholds]({{< relref "../thresholds.md" >}})

## Display options
Expand Down
2 changes: 0 additions & 2 deletions docs/sources/panels/visualizations/logs-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ weight = 700

The logs panel visualization shows log lines from data sources that support logs, such as Elastic, Influx, and Loki. Typically you would use this panel next to a graph panel to display the log output of a related process.

> **Note:** The Logs panel is only available in Grafana v6.4+.
<img class="screenshot" src="/static/img/docs/v64/logs-panel.png">

The logs panel shows the result of queries that were entered in the Query tab. The results of multiple queries are merged and sorted by time. You can scroll inside the panel if the data source returns more lines than can be displayed at any one time.
Expand Down
Loading

0 comments on commit 66e2624

Please sign in to comment.