Set chart display options

This document describes how to set the display options of a chart. You can do the following:

Add a reference line

The Threshold option creates a horizontal line from a point on the Y-axis. The line provides a visual reference for the chosen threshold value. You can add a threshold that refers to a value on the left Y-axis or the right Y-axis.

The following screenshot shows a chart with a threshold line:

Example chart with a threshold line applied.

In the previous screenshot, the threshold is set to 7500 and refers to the right Y-axis.

Charts on dashboards

To add reference line to a chart, do the following:

  1. In the Google Cloud console, go to the  Dashboards page:

    Go to Dashboards

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select a dashboard.
  3. In the chart's toolbar, select Edit.
  4. In the Display pane, check the Threshold option.
  5. Optional: To change the Y-axis, click Y-axis and select from the menu.
  6. Set a value for the threshold in the Threshold line field.

Metrics Explorer

To add reference line to a chart, do the following:

  1. In the Google Cloud console, go to the  Metrics explorer page:

    Go to Metrics explorer

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select a resource type and metric type to chart.
  3. In the chart's Display pane, expand Threshold Line, select Add threshold, and then complete the dialog.

Set x-ray, color, or statistics mode

Charts on dashboards

A chart's widget type and its chart mode setting determine how the chart displays data. For example, when you create a line chart, each time series is shown by a line with a unique color. However, you can configure a line chart to display statistical measures such as the mean and moving average.

There are three chart modes:

  • Color mode displays each time series with a unique color.
  • Stats mode displays common statistical measures for the data in a chart.
  • X-Ray mode displays each time series with a translucent gray color. Each line is faint, and where lines overlap or cross, the points appear brighter. Therefore, this mode is most useful on charts with many lines. Overlapping lines create bands of brightness, which indicate the normal behavior within a metrics group.

You can permanently change the mode of line charts. You can temporarily change the mode of line, stacked area, stacked bar, and heatmap charts.

To temporarily change the mode of a chart, do the following:

  1. In the Google Cloud console, go to the  Dashboards page:

    Go to Dashboards

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select a dashboard.
  3. In the chart's toolbar, click More options, and then make a selection from the menu.

    Your changes are discarded when the dashboard is reloaded.

To permanently change the mode of a line chart, do the following:

  1. In the Google Cloud console, go to the  Dashboards page:

    Go to Dashboards

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select a dashboard.
  3. In the chart's toolbar, select Edit.
  4. In the Display pane, click Chart mode, and then make a selection from the menu.

Metrics Explorer

A chart's widget type and its analysis mode setting determine how the chart displays data. For example, when you create a line chart, each time series is shown by a line with a unique color. However, you can configure a line chart to display statistical measures such as the mean and moving average.

There are three analysis modes:

  • Standard mode displays each time series with a unique color.
  • Stats mode displays common statistical measures for the data in a chart.
  • X-Ray mode displays each time series with a translucent gray color. Each line is faint, and where lines overlap or cross, the points appear brighter. Therefore, this mode is most useful on charts with many lines. Overlapping lines create bands of brightness, which indicate the normal behavior within a metrics group.

To change the analysis mode of a line chart, do the following:

  1. In the Google Cloud console, go to the  Metrics explorer page:

    Go to Metrics explorer

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select a resource type and metric type to chart.
  3. In the chart's Display pane, expand Analysis mode, and then make a selection from the menu.

Examples

The following screenshot shows a chart in color mode:

Example of a chart in color mode.

The following screenshot shows the previous chart but in statistics mode:

Chart in statistics mode.

When you select statistics mode, the chart legend displays various statistics, like mean, standard deviation, and others.

The following screenshot shows a chart in X-ray mode:

Example of a chart in X-ray mode.

X-ray mode highlights central tendencies and outliers in dense graphs. For example, consider a cluster of machines that are serving the same data. If you view the CPU utilization across the cluster, then you would expect to see a band around the cluster's average CPU utilization. That band shows how the average ranges and can indicate whether the cluster is over- or under-provisioned. You can also use X-ray mode to identify servers that are not operating optimally.

Set the Y-axis to log scale

The Log scale on Y-axis option rescales the chart's Y-values logarithmically. You can scale the left Y-axis, the right Y-axis, or both axes. This rescaling is useful when values cluster tightly within a small range. Check the box to enable this option, and clear the box to disable it.

The following screenshots show the same chart with the default Y-axis and with a log-scaled Y-axis.

Default Y-axis:

Example of a chart with default Y-axis.

Log-scaled Y-axis:

Example of a chart with a log-scaled Y-axis.

Charts on dashboards

To set the Y-axis to log scale, do the following:

  1. In the Google Cloud console, go to the  Dashboards page:

    Go to Dashboards

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select a dashboard.
  3. In the chart's toolbar, select Edit.
  4. In the Display pane, check Log scale on Y-axis.

Metrics Explorer

To set the Y-axis to log scale, do the following:

  1. In the Google Cloud console, go to the  Metrics explorer page:

    Go to Metrics explorer

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. Select a resource type and metric type to chart.
  3. In the chart's Display pane, expand Scale, and then select Log scale on Y-axis. There are different options available for the left and right axes.

Configure API mode

Charts on dashboards

To be able to view a widget's configuration as described by the Cloud Monitoring API, click Show API Mode in Configuration.

When selected, a tab labeled API is available on the configuration pane for every widget on the dashboard. API mode can be useful when you manage your dashboards through the Google Cloud console and the Cloud Monitoring API.

Metrics Explorer

Not available.

What's next