Documentation

Single Stat visualization

The Single Stat view displays the most recent value of the specified time series as a numerical value.

Single stat example

Select the Single Stat option from the visualization dropdown in the upper left.

Single Stat behavior

The Single Stat visualization displays a single numeric data point. It uses the latest point in the first table (or series) returned by the query.

Queries should return one table

Flux does not guarantee the order in which tables are returned. If a query returns multiple tables (or series), the table order can change between query executions and result in the Single Stat visualization displaying inconsistent data. For consistent results, the Single Stat query should return a single table.

Single Stat Controls

To view Single Stat controls, click Customize next to the visualization dropdown.

  • Prefix: Prefix to be added to the single stat.
  • Suffix: Suffix to be added to the single stat.
  • Decimal Places: The number of decimal places to display for the single stat.
    • Auto or Custom: Enable or disable auto-setting.
Colorized Thresholds
  • Base Color: Select a base or background color from the selection list.
  • Add a Threshold: Change the color of the single stat based on the current value.
    • Value is: Enter the value at which the single stat should appear in the selected color. Choose a color from the dropdown menu next to the value.
  • Colorization: Choose Text for the single stat to change color based on the configured thresholds. Choose Background for the background of the graph to change color based on the configured thresholds.

Single Stat examples

Show human-readable current value

The following example shows the current memory usage displayed has a human-readable percentage:

Query memory usage percentage
from(bucket: "example-bucket")
    |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
    |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent")
Memory usage as a single stat
Graph + Single Stat Memory Usage Example

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB v3 enhancements and InfluxDB Clustered is now generally available

New capabilities, including faster query performance and management tooling advance the InfluxDB v3 product line. InfluxDB Clustered is now generally available.

InfluxDB v3 performance and features

The InfluxDB v3 product line has seen significant enhancements in query performance and has made new management tooling available. These enhancements include an operational dashboard to monitor the health of your InfluxDB cluster, single sign-on (SSO) support in InfluxDB Cloud Dedicated, and new management APIs for tokens and databases.

Learn about the new v3 enhancements


InfluxDB Clustered general availability

InfluxDB Clustered is now generally available and gives you the power of InfluxDB v3 in your self-managed stack.

Talk to us about InfluxDB Clustered