Gauge chart

  • Latest Dynatrace
  • How-to guide
  • 2-min read
  • Published Mar 03, 2025
When to use gauge visualization

Use a gauge to visualize a single numerical value as a gauge.

Examples

Example 1

The gauge visualization above is based on the following query, which calculates CPU as the average host CPU usage. In the Data mapping settings, Gauge value is then set as CPU.

timeseries avg(dt.host.cpu.usage)
| fieldsAdd CPU = arrayAvg(`avg(dt.host.cpu.usage)`)
| fieldsKeep CPU

The Visual tab settings are as follows:

SectionSettings

Data mapping

  • Gauge value = CPU

Gauge bar

  • Show label = turned off
  • Min value = set to Auto
  • Max value = set to Auto

Color

  • Bar color = 62903c
  • Custom colors =
    • 60 and (for the custom color) dc671e
    • 80 and (for the custom color) cd3c44

Units and formats

  • Selected value = CPU
  • Unit = Percent (%)
  • Displayed unit = Auto
  • Decimals = 0.00

Example 2

The gauge visualization above is based on the following query, which calculates pctActive as the percentage of total problems that are open. In the Data mapping settings, Gauge value is then set as pctActive.

fetch dt.davis.problems
| summarize count = count(), by:{event.status}
| summarize { active=toDouble(takeAny(if(event.status=="ACTIVE", count))), closed=toDouble(takeAny(if(event.status=="CLOSED", count)))}
| fieldsAdd total = active + closed
| fieldsAdd pctActive = (active / total) * 100
| fieldsKeep pctActive

The Visual tab settings are as follows:

SectionSettings

Data mapping

  • Gauge value = pctActive

Gauge bar

  • Show label = turned on and set to Percentage of Open Problems
  • Min value = set to Auto
  • Max value = set to Auto

Color

  • Bar color = 438FB1
  • Custom colors = 90 and (for the custom color) c21930

Units and formats

  • Selected value = pctActive
  • Unit = Percent (%)
  • Displayed unit = Auto
  • Decimals = 0

Title

Use the title field at the top of the options panel (initially Untitled tile or Untitled section) to add a title to your dashboard tile or notebook section.

  • You can use emojis such as 😃 and 🌍 and ❤️.
  • You can use variables.

Example:

  1. Define variables called Status and Emoji in your dashboard.
  2. Set the title to Current $Emoji status is $Status.
  3. Set Status to Good.
  4. Set Emoji to 🌍.

The title will be displayed as Current 🌍 status is Good.

Visualization

If you aren't sure that you chose the right visualization, use the visualization selector to try different visualizations.

Data mapping

The data mapping section shows how a column of your result is mapped to the visualization.

Expand for general rules on data mapping settings

Expand the Data mapping section of your visualization settings to see how data in your result is mapped to your visualization, and to adjust those settings if needed.

  • Mandatory fields are marked with an asterisk (*). Example:

  • Data types are displayed next to field names in dropdowns and mapped fields.

  • Units are displayed when there’s only one assigned.

  • Result fields are grouped into Suitable and Unsuitable. Fields are marked as unsuitable if they cannot be used to display data in the visualization. Example:

  • Automatic application of data mapping default settings:

    Dynatrace version 1.319+

    • Already existing tiles and sections are considered to be user-defined. Their data mapping configurations aren't updated automatically.
    • Newly created tiles and sections apply a data mapping setting by default. If you don't modify these settings manually, these settings might change if a new execution of the tile/section modifies the results and there are fields missing or new fields that better suit the data mapping.

Visualization-specific data mapping settings

For a gauge chart, the data mapping section includes:

  • Gauge value: the numeric value you want to represent as a gauge.

Gauge bar

  • Show label: To display a string in the center of the gauge, turn on Show label and enter the string.

  • Show icon: To display an icon next to the value, turn on Show icon and select an icon from the list.

  • Min value determines where the gauge starts on the left.

    • Auto selects a suitable minimum based on data.
    • Data lets you select a field.
    • Custom lets you set a manual minimum value.
  • Max value determines where the gauge ends on the right.

    • Auto selects a suitable minimum based on data.
      • If the gauge value is less than 100, the right end of the gauge = 100
      • If the gauge value is greater than 100, the right end of the gauge is the gauge value
    • Data lets you select a field.
    • Custom lets you set a manual maximum value.

Color

The Color settings for a visualization are displayed in rows.

Each row associates a color scheme with a condition/value related to a selected field displayed in the visualization.

To adjust the settings for a row, there are two menus of settings that will be used in combination to determine which color is displayed:

  • The first menu in a row displays the selected color or color palette. Open this menu to display three tabs of color options:
    • Palettes: select a color palette to use for this row.
      Palette exceptions for certain visualization types
      • Heatmap and honeycomb: the palette only applies the first color (unless color rules match the data mapping values or Name is used), and the palette is not reflected in the legend.
      • Categorical: the nth color in the palette is applied to the nth item in the series.
      • Categorical for multiple subcategories: palettes are by bin but are not reflected in the legend.
    • Colors: select a color to apply uniformly when this rule matches.
    • Custom: specify a precise hex color code (for example, #134FC9) or use the color picker to select a color visually.
  • The second menu in a row displays the condition under which this row's color will be displayed. Select the current setting to change the field, operator, and value as needed to evaluate the condition.
    • The fields available for evaluation depend on the raw data.
      • Name is a special property constructed via the Data mapping setting Names.
      • Value is a special property constructed via the Data mapping setting Values (heatmap visualization only).
    • The available operators change to suit the conditon being evaluated.

Color: additional actions

  • To add a row, select and configure it as described above.
  • To move a row up or down in the table, select and drag .
  • opens a menu of further options:
    • Move up and Move down move the row up or down one row.
      These are alternatives to .
    • Duplicate creates a copy of the selected row.
    • Delete section removes the row. You can delete all color rules for table and single value visualizations; all other visualizations need at least one color rule.

Units and formats

To override the default units and formats in a dashboard or notebook visualization

  1. Select to edit the visualization tile.

  2. Select the Visual tab.

  3. Select Units and formats.

  4. Select Override.

  5. Select Override

  6. In the dropdown list, select the item for which you want to add a unit override.

    This is a numeric column of the underlying DQL result, so it varies according to the query. For example:

    • A fetch events query returns events. The dropdown list here lets you select a numeric field (such as transfer_size) from the results.
    • A timeseries avg(dt.host.cpu.usage) query returns a single timeseries for avg(dt.host.cpu.usage). That timeseries is then the only selectable option in the list.
  7. Define the override.

    • Default unit: The base unit in which the values were captured. It's None if it was not included in the DQL result, or its automatically defined by the unit passed from the DQL result. This field doesn't lead to any conversion.
    • Displayed unit: Once you define a default unit, you can use Displayed unit for conversion. For example, if the DQL result defined your numeric value in the result as Bytes, Displayed unit now offers a suitable list of byte conversions such as Kilobyte and Megabyte. Unlike the Default unit, the Displayed unit is always a numeric conversion.
    • Decimals displays the default number of decimals (degree of precision) to display. To see it in action, change the Decimals selection and observe the change in the visualization.
    • Suffix displays the suffix to display after the unit. To see it in action, enter a string and observe the change in the visualization. When you don't find the unit you're looking for, you can use Suffix to display the desired unit.
  8. Turn on Abbreviate large numbers if you want to display large figures in abbreviated form. For example, 1053 becomes 1.1K.

To reset to defaults (discard override settings for the selected item), select the trash can next to the item.

Example for dashboards

This example uses a line chart, but the options apply to other visualizations.

  1. In Dashboards Dashboards, create a dashboard.

  2. Select and, in the Snippets section of the menu, select Metrics > Chart average CPU across all hosts.

  3. In the section edit panel, select the Visual tab and select Line.

  4. Select Units and formats.

  5. Select Override.

  6. In the dropdown list, select the metric for which you want to add an override. There's only one metric to select in this example.

  7. Define the override for the displayed metric. You can observe your changes in the Y-axis of the chart.

    • Default unit displays Percent (%), which is the default unit for the selected metric. Try a different setting, such as One to instead display the result as a fraction of 1.

    • Displayed unit displays Auto. You can change it to a different unit, such as One to instead display the result as a fraction of 1.

      Only linear and static conversions are supported. For example, you cannot convert Degree Celsius(°C) into Degree Fahrenheit(°F), or convert Usd(US$) into Eur(€).

    • Decimals displays the default number of decimal points (degree of precision) to display. To see it in action, change the Decimals selection and observe the change in the visualization.

      For example, change this:

      To this:

    • Suffix displays the optional suffix to display after the unit. To see it in action, enter a string and observe the change in the visualization.

To reset to defaults (discard override settings for the selected metric), select the trash can next to the metric.

Query limits

Use the Query limits section to check and adjust the Grail query limits per notebook section or dashboard tile. These settings determine the maximum limits when fetching data. Exceeding any limit will generate a warning.

Dashboard tiles and notebook sections created in Dynatrace earlier than version 1.296 are not affected. Those existing tiles/sections will return the same results as before.

  • Read data limit (GB)

    The limit in gigabytes for the amount of data that will be scanned during a read.

  • Record limit

    The maximum number of result records that this query will return. Default: 1,000 records. To see more records, you need to increase the value of Record limit.

    • If your query has no limit, such as

      fetch logs

      the value of Record limit is applied. By default, you will see up to 1,000 records.

    • If your query also includes a limit, such as

      fetch logs
      | limit 2000

      the lower of the two values (either limit in your query, or Record limit in the web UI) is applied.

      In the example above, you would still see only 1,000 records unless you increased the value of Record limit.

  • Result size limit

    The maximum number of result bytes that this query will return. For better performance with typical queries and smaller documents, the default is set to 1 MB.

  • Sampling (Logs and Spans only)

    Results in the selection of a subset of Log or Span records.

Related tags
Dynatrace Platform