Field overrides
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.
- Navigate to the panel you want to edit, click the panel title, and then click Edit.
- In the side pane, click Overrides.
Grafana displays a list of field overrides, if any have been created for this panel.
Add a field override
- In the side pane, click Overrides.
- Click Add field override.
- 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.
- Click Add override property.
- Select the field option that you want to apply.
- 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.
- When finished, click Save to save all panel edits to the dashboard.
- Navigate to the panel you want to edit, click the panel title, and then click Edit.
- In the side pane, click Overrides.
- 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
- Navigate to the panel you want to edit, click the panel title, and then click Edit.
- Click the trash can icon next to the override that you want to delete.
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 °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 to zero (0
), resulting in the following table:
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 |
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% |