2022-05-26 23:06:25 +08:00
---
aliases:
2022-12-10 00:36:04 +08:00
- ../../features/panels/singlestat/
- ../../features/panels/stat/
- ../../panels/visualizations/stat-panel/
- ../../reference/singlestat/
- ../../visualizations/stat-panel/
2023-12-13 04:27:29 +08:00
description: Configure options for Grafana's stat visualization
2022-05-26 23:06:25 +08:00
keywords:
- grafana
- docs
- stat panel
Explicitly set all front matter labels in the source files (#71548)
* Set every page to have defaults of 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration pages to have of 'Cloud', 'Enterprise', and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/enterprise-licensing pages to have 'Enterprise' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/organization-management pages to have 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/provisioning pages to have 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/recorded-queries pages to have labels cloud,enterprise
* Set administration/roles-and-permissions/access-control pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/stats-and-license pages to have labels cloud,enterprise
* Set alerting pages to have labels cloud,enterprise,oss
* Set breaking-changes pages to have labels cloud,enterprise,oss
* Set dashboards pages to have labels cloud,enterprise,oss
* Set datasources pages to have labels cloud,enterprise,oss
* Set explore pages to have labels cloud,enterprise,oss
* Set fundamentals pages to have labels cloud,enterprise,oss
* Set introduction/grafana-cloud pages to have labels cloud
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix introduction pages products
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set panels-visualizations pages to have labels cloud,enterprise,oss
* Set release-notes pages to have labels cloud,enterprise,oss
* Set search pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/audit-grafana pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/configure-authentication pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/configure-authentication/enhanced-ldap pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-authentication/saml pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-request-security pages to have labels cloud,enterprise,oss
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/configure-team-sync pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/export-logs pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set troubleshooting pages to have labels cloud,enterprise,oss
* Set whatsnew pages to have labels cloud,enterprise,oss
* Apply updated labels from review
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-07-18 16:10:12 +08:00
labels:
products:
- cloud
- enterprise
- oss
2022-05-26 23:06:25 +08:00
title: Stat
2023-09-01 02:31:37 +08:00
weight: 100
2022-05-26 23:06:25 +08:00
---
2020-05-11 22:31:31 +08:00
2021-06-04 04:02:47 +08:00
# Stat
2020-05-11 22:31:31 +08:00
2023-09-22 22:27:16 +08:00
Stats show one large stat value with an optional graph sparkline. You can control the background or value color using thresholds or overrides.
2020-05-11 22:31:31 +08:00
2023-09-22 22:27:16 +08:00
{{< figure src = "/static/img/docs/v66/stat_panel_dark3.png" max-width = "1025px" caption = "Stat visualization" > }}
2020-05-11 22:31:31 +08:00
2023-05-23 04:45:28 +08:00
{{% admonition type="note" %}}
2023-09-22 22:27:16 +08:00
This visualization replaces the Singlestat visualization, which was deprecated in Grafana 7.0 and removed in Grafana 8.0.
2023-05-23 04:45:28 +08:00
{{% /admonition %}}
2020-10-08 02:21:28 +08:00
2023-09-22 22:27:16 +08:00
By default, a stat displays one of the following:
2020-10-08 02:21:28 +08:00
- Just the value for a single series or field.
- Both the value and name for multiple series or fields.
2023-03-31 20:55:29 +08:00
You can use the **Text mode** to control how the text is displayed.
2020-10-08 02:21:28 +08:00
Example screenshot:
2023-09-22 22:27:16 +08:00
{{< figure src = "/static/img/docs/v71/stat-panel-text-modes.png" max-width = "1025px" caption = "Stat visualization" > }}
2020-10-08 02:21:28 +08:00
2021-06-04 04:02:47 +08:00
## Automatic layout adjustment
2020-05-16 04:58:39 +08:00
2021-06-04 04:02:47 +08:00
The panel automatically adjusts the layout depending on available width and height in the dashboard. It automatically hides the graph (sparkline) if the panel becomes too small.
2020-05-16 04:58:39 +08:00
2021-06-04 04:02:47 +08:00
## Value options
2020-05-11 22:31:31 +08:00
2023-03-31 20:55:29 +08:00
Use the following options to refine how your visualization displays its values:
2020-05-11 22:31:31 +08:00
2021-06-04 04:02:47 +08:00
### Show
2023-03-31 20:55:29 +08:00
Display a single value per column or series, or show values for each row.
2021-08-06 21:52:36 +08:00
2021-06-04 04:02:47 +08:00
#### Calculate
2023-03-31 20:55:29 +08:00
Display a calculated value based on all rows.
2021-06-04 04:02:47 +08:00
2023-09-13 17:39:04 +08:00
- **Calculation -** Select a reducer function that Grafana will use to reduce many fields to a single value. For a list of available calculations, refer to [Calculation types][].
2023-09-22 22:27:16 +08:00
- **Fields -** Select the fields display in the visualization.
2021-06-04 04:02:47 +08:00
#### All values
Show a separate stat for every row. If you select this option, then you can also limit the number of rows to display.
- **Limit -** The maximum number of rows to display. Default is 5,000.
2023-09-22 22:27:16 +08:00
- **Fields -** Select the fields display in the visualization.
2021-06-04 04:02:47 +08:00
## Stat styles
Style your visualization.
### Orientation
Choose a stacking direction.
- **Auto -** Grafana selects what it thinks is the best orientation.
- **Horizontal -** Bars stretch horizontally, left to right.
- **Vertical -** Bars stretch vertically, top to bottom.
### Text mode
2023-09-22 22:27:16 +08:00
You can use the Text mode option to control what text the visualization renders. If the value is not important, only the name and color is, then change the **Text mode** to **Name** . The value will still be used to determine color and is displayed in a tooltip.
2021-06-04 04:02:47 +08:00
- **Auto -** If the data contains multiple series or fields, show both name and value.
- **Value -** Show only value, never name. Name is displayed in the hover tooltip instead.
- **Value and name -** Always show value and name.
- **Name -** Show name instead of value. Value is displayed in the hover tooltip.
- **None -** Show nothing (empty). Name and value are displayed in the hover tooltip.
2023-11-11 01:42:24 +08:00
### Wide layout
Set whether wide layout is enabled or not. Wide layout is enabled by default.
- **On -** Wide layout is enabled.
- **Off -** Wide layout is disabled.
{{% admonition type="note" %}}
This option is only applicable when **Text mode** is set to **Value and name** . When wide layout is enabled, the value and name are displayed side-by-side with the value on the right, if the panel is wide enough. When wide layout is disabled, the value is always rendered underneath the name.
{{% /admonition %}}
2021-06-04 04:02:47 +08:00
### Color mode
Select a color mode.
2023-03-31 20:55:29 +08:00
- **None -** No color applied to the value.
- **Value -** Applies color to the value and graph area.
- **Background Gradient -** Applies color to the value, graph area, and background, with a slight background gradient.
- **Background Solid -** Applies color to the value, graph area, and background, with a solid background color.
2021-06-04 04:02:47 +08:00
### Graph mode
2023-09-22 22:27:16 +08:00
Select a graph and sparkline mode.
2021-06-04 04:02:47 +08:00
- **None -** Hides the graph and only shows the value.
- **Area -** Shows the area graph below the value. This requires that your query returns a time column.
### Text alignment
Choose an alignment mode.
- **Auto -** If only a single value is shown (no repeat), then the value is centered. If multiple series or rows are shown, then the value is left-aligned.
- **Center -** Stat value is centered.
2023-12-16 08:15:31 +08:00
### Show percent change
Set whether percent change is displayed or not. Disabled by default.
{{% admonition type="note" %}}
This option is not applicable when the **Show** setting, under **Value options** , is set to **All values** .
{{% /admonition %}}
2021-06-04 04:02:47 +08:00
## Text size
Adjust the sizes of the gauge text.
2020-05-11 22:31:31 +08:00
2021-06-04 04:02:47 +08:00
- **Title -** Enter a numeric value for the gauge title size.
- **Value -** Enter a numeric value for the gauge value size.
2023-09-13 17:39:04 +08:00
{{% docs/reference %}}
2023-11-28 04:00:57 +08:00
[Calculation types]: "/docs/grafana/ -> /docs/grafana/< GRAFANA VERSION > /panels-visualizations/query-transform-data/calculation-types"
[Calculation types]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/calculation-types"
2023-09-13 17:39:04 +08:00
{{% /docs/reference %}}