This page describes how to set the appearance of a chart:
- To add a visual reference line, see Adding a threshold.
- To choose a colorization scheme, see Setting the display mode.
- To view anomalous lines in a chart, see Configuring outlier mode.
- To overlay older data on the chart, see Configuring a comparison.
- To change the Y-axis to a logarithmic scale, see Setting the Y-axis to log scale.
Accessing the viewing options
Dashboard editor
To access the options previously described, do the following:
- Ensure that the Edit toggle in the
dashboard toolbar is in the on
position.
- Select the chart to enable the chart's configuration pane.
In the configuration pane, click Settings settings.
After you click Settings settings, a Back button arrow_back is displayed in the same location. To return to the main configuration options, click this button.
Legacy dashboard editor
To access the options previously described, select the View options tab in the chart-configuration page:
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.
To create a threshold line:
- Check the Threshold option.
Set the desired value for the threshold in the field under the option name.
Dashboard editor
The following screenshot shows the setting of a threshold:
Legacy dashboard editor
The following screenshot shows the setting of a threshold:
The following screenshot shows a chart with a threshold line:
Setting the chart mode
Dashboard editor
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. You can use the Chart mode option to refine how the data are displayed. 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, or you can select an alternative mode by using the Chart mode menu on the Settings pane.
After a chart is created, click Other options more_vert in the chart toolbar to select between color, statistics, and X-ray modes when those options are available.
Legacy dashboard editor
A chart's widget type determines the display style. For example, you can display multiple time series by individual lines or by stacked bars. You can use the Chart mode option to refine how the data are displayed. 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.
The are four 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 charts.
- Outlier: Line, stacked bar, stacked area, and heatmap widgets.
When creating a chart, you can leave the chart mode at the default value of Color, or you can select an alternative mode on the View options tab:
After a chart is created, click Other options more_vert in the chart toolbar to select between color, statistics, and X-ray modes when those options are available. To enable or disable Outlier mode, you must edit the chart.
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:
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 as well as a measure of similarity.
The following screenshot shows a 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.
You can use X-ray mode to see the central tendencies and outliers in dense graphs. For example, if you are looking at CPU utilization across a cluster of machines serving the same data in X-ray mode, you would expect to see a band around the average CPU utilization for the cluster. 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:
Configuring outlier mode
It's possible to create charts that display a large number of time series. A single metric might include many time series, and if a chart displays multiple metrics, it's easy to end up with a lot of data on the chart. In many cases, a large number of 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. This 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.
Dashboard editor
You can set outlier mode when you build the chart or when editing the chart. You can select the number of time series to show, whether you want extreme high or low values, and the method by which the time series are ranked, as seen in the following screenshot:
Legacy dashboard editor
Outlier mode is set when you build the chart, either by adding a chart to a dashboard, or by editing the chart. You can select the number of time series to show, whether you want extreme high or low values, and the method by which the time series are ranked, as seen in the following screenshot:
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:
For example, the following screenshot illustrates a chart in color-mode.
This chart contains main lines and is difficult to interpret. When outlier mode is enabled, by default, the chart shows the top 3 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. You cannot disable the gray content.
Configuring a comparison
The Compare to Past option lets you select a time range from the past by specifying a number of 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, if your chart is showing data from between 10am and 11am, and you specify data from 2 weeks ago as 'past data', you will see data collected between 10am and 11am on the day two weeks past.
If there is no data available from the requested period, then you won't see any change on the chart.
Dashboard editor
The following screenshot shows a request for data from 2 weeks ago:
Legacy dashboard editor
The following screenshot shows a request for data from 2 weeks ago:
The following screenshots show the same chart with and without the data from 2 weeks ago.
Without past data:
With past data and one time series highlighted:
Setting the Y-axis to log scale
The Log scale on Y-axis option rescales the chart's Y-values logarithmically. This rescaling is useful when values cluster tightly within a small range. Check to box to enable this option, and uncheck it 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:
Log-scaled Y-axis:
Configuring API mode
Dashboard editor
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. This can be useful when you manage your dashboards though the Google Cloud Console and the Cloud Monitoring API.
Legacy dashboard editor
API mode isn't available to for this editor.