Charts are used in many places in Stackdriver Monitoring. Charts appear on dashboards, which can display multiple charts. Single charts appear in Metrics Explorer and in the interface for configuring alerting conditions.
All charts share a common user interface; you interact with them using the same techniques, regardless of where they appear. This page describes how to use charts to analyze and interact with your data. For information on creating charts, either to add to a dashboard or by using Metrics Explorer, see Creating Charts.
Charts provide a variety of configuration controls; for example, you can display a chart in full-screen mode. The availablility and location of some of the chart controls varies between dashboards and Metrics Explorer.
On a dashboard, many controls appear on the dashboard toolbar.
Some of these controls apply to the dashboard itself—for example, Fullscreen (fullscreen). Some apply generally to all charts on the dashboard—for example, Auto Refresh (autorenew).
Apart from the dashboard controls, each chart on a dashboard has three per-chart control buttons opposite the chart's title:
For a chart in Metrics Explorer, chart controls appear on a toolbar similar to the dashboard toolbar, just above the chart. The controls apply only to the single chart in Metrics Explorer.
The functions of the controls are discussed in subsequent sections.
Showing and hiding legends
You can show or hide the legends of all charts on a dashboard or of each chart individually.
- To toggle the legends of all charts in a dashboard, use the Settings button, settings, on the Stackdriver Monitoring console.
- To toggle the legend of a particular chart, click the Toggle Legend button, list, above the graph.
The following screenshot shows a chart with its accompanying legend:
Each time series that is graphed on the chart also appears in the legend, where it is keyed to the chart by color. The legend also displays the value of each time series based on the location of the time selector.
The legend is also interactive; you can use it to actively explore the data on the chart, as discussed in the following sections.
Exploring charted data
When you select a metric to show in a chart, the chart displays each time series captured in the metric as both a line on a graph and as an entry in the legend. The legends may or may not be currently displayed for charts on a dashboard; you can toggle them on or off.
The chart also includes a movable dashed line, a time selector, attached to the X-axis. You can move this line to select a specific point within the displayed time range. For charts on a dashboard, the time selector is synchronized across the charts.
The following screenshot shows the chart for a metric containing several time series. The time selector is positioned along a rising line in the graph.
This section describes how to work with the legend, the time selector, and other features of the chart to explore the data it displays. The interactions include, but are not limited to:
- Highlighting individual time series in the metric.
- Determining the values of time series at a particular time.
- Choosing the period of time for which data is displayed.
- Feeding new data into the chart.
Highlighting data on the chart
You can examine the metric data by manipulating either the chart itself or the legend below it.
For example, suppose you see a spike on a chart in a specific time series, and you want to determine the value of that particular time series at the time of the spike. You can accomplish this in several different ways:
- Place the pointer on the graph line at a specific point in time.
- The selected line is highlighted, and the others are dimmed.
- A floating readout appears, indicating the time series represented by the time, a time stamp, and the value at that timestamp.
- Move the pointer horizontally, using the time selector to change the point in time, and pause when you reach the desired time.
- To highlight a different graph line, move the pointer to a different line either in the chart or in the legend.
The following screenshot shows the value of the
gateway-30 time series at
the spike in its graph line:
The floating readout shows you the values of each time series at this point;
this information also appears in the
Value column in the legend.
Isolating data on the chart
To focus on a particular time series more closely, click the corresponding row in the table. This re-scales the Y-axis for the range of values of the selected entry, highlighting the chosen graph and dimming the others, if they are visible at the new scale.
This screenshot shows the
gateway-54 time series, both isolated and
re-scaled. (Note that the other time series graphs now are now clipped.)
You can also isolate more than one time series this way; just click on additional rows in the table. The names of the isolated entries appear in type colored with their legend keys.
Clicking a selected row again removes it from the display group; the entry in the legend appears in black type.
Zooming in on the chart
You can select a specific time period or a range of values from the Y-axis to examine.
To select a time period:
- Click on the chart to place the time selector.
- Press the
Controlkey and drag the time selector horizontally, in either direction. This creates a gray region between two time selectors.
- Release the
Controlkey and the pointer to set the time range.
Selecting a range of values on the Y-axis is similar:
- Click on the chart.
- Press the
Controlkey and drag the pointer up or down.
- Release the
Controlkey and pointer.
If you zoom on one chart on a dashboard, all of the charts zoom together.
Zooming in or out on a chart changes the range of data shown; this can result in realignment of the time-series; see Alignment intervals for more information.
The following screenshot shows the selection for a time period for zoom:
When you release the zoom selector, the following things happen:
- The chart zooms in on the time period or Y-axis range you selected.
- On the Resources > Metrics Explorer page, a Reset Zoom button, zoom_out, appears.
- If you have enabled the auto-refresh option, it is disabled during the zoom, so the chart doesn't change while zoomed.
The following screenshot shows the result of zooming in on a selected time period:
After zooming a chart, you can zoom again, or you can restore the chart to the unzoomed state by clicking the Reset Zoom button. On a dashboard, this affects all the charts.
When you reset the chart:
- On Metrics Explorer charts, the Reset Zoom option vanishes.
- If the auto-refresh feed was enabled before the zoom, it is re-enabled, and any data that was held back during the zoom is now added.
Setting the display period
The chart can display data for a range of periods, typically from 1 hour to 6 weeks.
On a dashboard, you can also specify a custom display period on the dashboard toolbar. This display period applies to all the charts on the dashboard. You can set the display period for isolated charts, like those in Metrics Explorer, as well.
Changing the time range on a chart changes the range of data shown; this can result in realignment of the time-series; see Alignment intervals for more information.
To change the range, select one of the Time options:
For a new project, data may not be available for all parts of the range.
The following screenshot shows two charts from a dashboard. Note that the display period, on the X-axis, is shared across charts on a dashboard.
Dynamic or static data
Charts display data within a window of time. By default, this window advances, wtih “now” always at the right edge of the chart. The width of the window into the past is determined by the time selection, for example, 1 hour. The data on the chart is dynamic; as new data is generated, it appears at “now”, and old data moves out of the window. By default, this behavior is enabled.
You can keep the time window from changing by turning off Auto Refresh, autorenew. This static option is is useful when you want to study an event in the past and not be distracted by new data. The Auto Refresh button turns red to warn you that the data is static.
Dashboards provide a single Auto Refresh control that applies all charts on the dashboard. When building a chart on the Resources > Metrics Explorer page, the auto-refresh option is always on. You can turn it off by editing the “share” URL.
Enlarging a chart
You can enlarge a single chart on a dashboard by clicking the Fullscreen button, fullscreen, in the upper right area of the chart. The Fullscreen button on the dashboard toolbar affects the entire dashboard.
In full-screen mode, the icon on the button changes so that the corners point toward the center: fullscreen_exit. To exit full-screen mode, click the button again, or press the Esc key.
Charts on a dashboard have a context-dependent set of additional options. These are available on the Other options button, more_vert.
By clicking the Other options button, you can change the display mode of the chart and save an image of the chart as a PNG file. Additionally, if you have any alerting policies configured and the chart is showing metrics being monitored by those policies, you can view logs from this menu.
Setting the display mode
A chart provides multiple viewing modes, though not all of them may be available for every chart. For a given chart, the possible modes are:
You set the chart mode when the chart is added to the dashboard or created in Metrics Explorer, and that initial mode acts as the default. Color mode is the most common mode. Outlier mode is available only when the chart is created; it is not available on the dashboard.
If you are looking at a chart on a dashboard, you can reset the chart mode by clicking the Other options button, more_vert, on the chart and selecting the desired mode. You can also set the mode for all charts on a dashboard from the dashboard Settings button, settings.
For more on using these other chart modes, see [Chart modes][chart-mode].
Altering, incidents, and logs
If you've configured any alerting policies, a chart displaying metrics involved in those policies provides a visual marker for unresolved incidents as a set of red dots directly above the chart. These are keyed to the time of their occurrence.
In this case, the Other options menu also provides a View logs option. Click this option to bring up the Stackdriver Logs Viewer. See Viewing logs for information on using the interface.
Sharing a chart
You can share a chart with others by sending them a parameterized URL. To create this URL for a chart on the Metrics Explorer:
- Click Other options, more_vert, above the Y-axis on the chart.
- Click the Share option.
- Click the Copy Link button.
- Paste the link into e-mail, a browser, or other application to share it.
The following screenshot shows the Share dialog:
To create a sharing URL for a chart on a dashboard:
- Click Other options (3 stacked dots) above the Y-axis on the chart.
- Click the Share option.
The dashboard shows you a Share Chart box with the URL in it. Copy that URL and paste it into another application to share it. Click the Close button to dismiss the box.
When you share a chart by URL, you are sharing an active chart.
You can also take a static screenshot of a chart on a dashboard by choosing Other options > Download image option.