Set view options

Stay organized with collections Save and categorize content based on your preferences.

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

You configure the appearance of a chart by using the chart's Settings fields.

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.

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

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards, then select the dashboard that you want to view or edit.
  3. If the Edit dashboard button is shown, then click it.
  4. Select the chart to enable the chart's configuration pane.
  5. In the configuration pane, click Settings.
  6. Check the Threshold option.
  7. Optional: To change the Y-axis, click Y-axis and select from the menu.
  8. Set the desired value for the threshold in the Threshold line field.

Set x-ray, color, or statistics mode

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, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards, then select the dashboard that you want to view or edit.
  3. For a chart, click More options and 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, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards, then select the dashboard that you want to view or edit.
  3. If the Edit dashboard button is shown, then click it.
  4. Select the chart to enable the chart's configuration pane.
  5. In the configuration pane, click Settings.
  6. Cick Chart mode and 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.

Show outliers

Outlier mode shows you the anomalous lines on the chart rather than the highly representative ones. Outlier mode reduces the number of lines on the chart and helps keep individual charts both responsive and intelligible. Outlier mode is available for line, stacked bar, stacked area, and heatmap widgets.

For example, the following screenshot illustrates a chart in color-mode.

Example of a chart without outlier mode enabled.

This chart contains main lines and is difficult to interpret. When outlier mode is enabled, by default, the chart shows the top three lines, ranked by mean. A small annotation on the chart describes the display criteria. In the background, shown in gray, is an outline of all time-series data. You cannot disable the gray content.

Example of a chart in outlier mode.

To configure a chart to display outliers, do the following:

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards, then select the dashboard that you want to view or edit.
  3. If the Edit dashboard button is shown, then click it.
  4. Select the chart to enable the chart's configuration pane.
  5. In the configuration pane, click Settings.
  6. Select Outlier mode.
  7. Enter a value for the maximum number of time series to display, and then select values for how time series are ranked and whether you want the top or bottom outliers to be shown.

Compare current to past data

The Compare to Past option lets you select a time range from the past by specifying the hours, days, or weeks. The data from that time range is then superimposed as a dotted line over the current data on a line chart. The legend also shows past and present values.

Compare to Past is available only for line charts.

The data superimposed on your chart is for the same display period as your chart, but from the specified time in the past. For example, consider a chart that shows data from 10am to 11am. If you specify data from 2 weeks ago as 'past data', then you see data collected between 10am and 11am on the day two weeks past.

If there is no data available from the requested period, then there aren't any changes on the chart.

The following screenshots show the same chart with and without the data from 2 weeks ago.

Without past data:

Example of a chart without past data.

With past data and one time series highlighted:

Example of a chart with past data.

To show older data on the chart, do the following:

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards, then select the dashboard that you want to view or edit.
  3. If the Edit dashboard button is shown, then click it.
  4. Select the chart to enable the chart's configuration pane.
  5. In the configuration pane, click Settings.
  6. Check the Compare to Past option.
  7. Set the Value and Scope fields to specify how far in the past to go.

    For example, if Value is 2 and Scope is weeks, then the chart displays the current data and data from the 2 weeks in the past.

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.

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

  1. In the Google Cloud console, select Monitoring or click the following button:
    Go to Monitoring
  2. In the navigation pane, select Dashboards, then select the dashboard that you want to view or edit.
  3. If the Edit dashboard button is shown, then click it.
  4. Select the chart to enable the chart's configuration pane.
  5. In the configuration pane, click Settings.
  6. Check Log scale on Y-axis.

Configure API mode

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.

What's next