Setting view options

This page describes how to set the appearance of a chart:

Accessing the viewing options

To access the options for a chart on a dashboard, do the following:

  1. In the dashboard toolbar, ensure that Editing is displayed.
  2. Select the chart to enable the chart's configuration pane.
  3. In the configuration pane, click Settings.

    After you click Settings, a Back button is displayed in the same location. To return to the main configuration options, click this button.

To access the viewing options when using Metrics Explorer, click Settings.

Adding a threshold

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.

To create a threshold line:

  • Check the Threshold option.
  • (Optional) To change the Y-axis, click Y-axis and select from the menu.
  • Set the desired value for the threshold in the field under the option name.

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.

Setting the chart mode

A chart's widget type determines the possible display styles. For example, you can display multiple time series by individual lines or by stacked bars. To refine how the data are displayed, you can use the Chart mode option. For example, if you have selected a line chart, you can view the individual time series or you can view statistical measures such as the mean and moving average.

There are three possible chart modes, though not all of them are available for every widget type:

  • Color: Line, stacked bar, stacked area, and heatmap widgets.
  • Statistics: Line charts.
  • X-Ray: Line, stacked bar, stacked area, and heatmap widgets.

When creating a chart, you can leave the chart mode at the default value of Color. You can also select an alternative mode by using the Chart mode menu on the Settings pane.

After a chart is created, click Other options in the chart toolbar to select between color, statistics, and X-ray modes when those options are available.

Color mode

Color mode is the default chart mode and is available for all widgets. In color mode, a unique color is assigned to each time series.

For comparison in the subsequent sections, the following screenshot shows a chart in color mode:

Example of a chart in color mode.

Statistics mode

Statistics mode displays common statistical measures for the data in a chart. Statistics mode is available only for line charts.

When you select statistics mode, the chart displays a banner that shows the maximum and minimum values and a measure of similarity.

The following screenshot shows a chart in statistics mode:

Chart in statistics mode

For charts on a dashboard, the legend displays various statistics, like mean, standard deviation, and others.

X-ray mode

X-ray mode displays all the graph lines with a translucent gray color. Each line is faint, and where lines overlap or cross, the points appear brighter. Therefore, X-ray mode is most useful on charts with many lines. Overlapping lines create bands of brightness, which indicate the normal behavior within a metrics group. X-ray mode is available only for line charts.

To see the central tendencies and outliers in dense graphs, you can use X-ray mode. 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.

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

Example of a chart in X-ray mode.

Configuring outlier mode

It's possible to create charts that display many time series. A single metric might include many time series, and if a chart displays multiple metrics, it's easy to end up with many time series on the chart. Often, many lines on a chart can obscure the interesting ones.

In addition, charts with lots of lines are less responsive than charts with fewer lines, especially when the chart is displaying data from longer time ranges.

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.

You can set outlier mode when you build the chart or when editing the chart. As shown in the following screenshot, you can select the number of time series to show, whether you want extreme high or low values, and how the time series are ranked:

Display of the dialog for specifying outlier mode.

You also can change a noisy chart to outlier mode by clicking the link in the banner the chart displays when there are too many lines to be useful:

Example of the too-many-lines banner displayed when a chart has too much data.

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.

Configuring a comparison

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.

To show older data on the chart:

  • Check the Compare to Past option.
  • Specify how far back in the past to go:
    • The period (hours, days, weeks)
    • The number of periods

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 screenshot shows a request for data from 2 weeks ago:

Example of the settings for comparing current to past data.

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.

Setting 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.

Configuring 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