# Single-metric gauge chart

Create a single-metric gauge chart to display a ratio of a single metric in relation to the total.

<figure><img src="/files/9EfF9BYHVcDM0rhd72tK" alt="single-metric gauge chart"><figcaption></figcaption></figure>

## Data shape <a href="#single-metricgaugechart-datashape" id="single-metricgaugechart-datashape"></a>

`<metric value>, <total>`

## NQL structure <a href="#single-metricgaugechart-nqlexamples" id="single-metricgaugechart-nqlexamples"></a>

{% hint style="info" %}
Refer to the [Live Dashboards NQL examples](/platform/user-guide/live-dashboards/live-dashboards-nql-examples.md#livedashboardsnqlexamples-single-metricgaugechart) documentation for query examples of single-metric gauge widgets.
{% endhint %}

```
<devices|users>
| include <event table>
| compute temp_bad_number = <device|user>.count()
| summarize 
   <metric> = temp_bad_number.sum(), 
   <total> = count()
```

## Configuring visualization fields specific to single-metric gauges <a href="#linechart-linechartspecificsettings" id="linechart-linechartspecificsettings"></a>

{% hint style="info" %}
Refer to the [Managing Live Dashboards](/platform/user-guide/live-dashboards/managing-live-dashboards.md#filling-in-widget-visualization-fields) documentation to learn how to fill in the remaining configuration fields that are not specific to this widget.
{% endhint %}

After selecting the **Single metric gauge chart** option from the **Chart type** dropdown in the [Add widget](/platform/user-guide/live-dashboards/managing-live-dashboards.md#adding-widgets)/[Edit a widget](/platform/user-guide/live-dashboards/managing-live-dashboards.md#managing-widgets) pop-up:

1. Use the **Label (optional)** field to create the visible name of the single-metric gauge.
   * The text can contain special characters. There is a 50-character limit on the **Label** field.
2. Enter a **Widget description (optional)** to explain, for example, how the metric should be interpreted, calculated, or any subtleties to the metric.
   * The widget description appears by hovering over the info icon next to the single-metric gauge widget in the dashboard.
3. **Choose an output color** for the gauge based on the data to define:
   * Bad (red)
   * Average (yellow)
   * Good (green)
4. Alternatively, establish **Rating** thresholds to change the gauge color if the metric value exceeds the defined limits, allowing for quick identification of issues. Choose from:
   * **1 threshold**: the single-metric gauge chart is either green or red, depending on whether the metric exceeds the given threshold.

     <figure><img src="/files/BTftzzdqBABGdUv1poAb" alt="One threshold rating" width="680"><figcaption></figcaption></figure>

     * The system evaluates thresholds with the >= operator. The example above is evaluated as follows:
       * **Good**: if the metric is < 35
       * **Bad**: if the metric is >= 35
     * Select **Invert** to invert the good and bad conditions. When inverted, the example above is evaluated as follows:
       * **Bad**: if the metric is < 35
       * **Good**: if the metric is >= 35
   * **2 thresholds**: the single-metric gauge chart is either green, yellow or red, depending on whether the metric exceeds the given thresholds.

     <figure><img src="/files/3zq55iY18CEOjImAXd2o" alt="Two threshold rating" width="680"><figcaption></figcaption></figure>

     * The system evaluates thresholds with the >= operator. The example above is evaluated as follows:
       * **Good**: if the metric is < 35
       * **Average**: if the metric is >= 35 AND the metric is < 65
       * **Bad**: if the metric is >= 65
     * Select **Invert** to invert the good and bad conditions. When inverted, the example above is evaluated as follows:
       * **Bad**: if the metric is < 35
       * **Average**: if the metric is >= 35 AND the metric is < 65
       * **Good**: if the metric is >= 65

***

RELATED TOPIC

* [KPI](/platform/user-guide/live-dashboards/widget-types/kpi.md)
* [Line chart](/platform/user-guide/live-dashboards/widget-types/line-chart.md)
* [Bar chart](/platform/user-guide/live-dashboards/widget-types/bar-chart.md)
* [Multi-metric gauge chart](/platform/user-guide/live-dashboards/widget-types/multi-metric-gauge-chart.md)
* [Table](/platform/user-guide/live-dashboards/widget-types/table.md)
* [Heading](/platform/user-guide/live-dashboards/widget-types/heading.md)
* [Filter widget](/platform/user-guide/live-dashboards/widget-types/filter-widget.md)
* [Timeframe picker](/platform/user-guide/live-dashboards/widget-types/timeframe-picker.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexthink.com/platform/user-guide/live-dashboards/widget-types/single-metric-gauge-chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
