All charts share a common user interface; you interact with them using the same techniques, regardless of where they appear. This section describes the common tools each chart provides.
Charts typically provide a variety of configuration controls as well. For charts on dashboards, some controls are attached to the dashboard itself and affect all charts on the dashboard; these are called out where applicable.
This page describes how you can interact with charts. For information on creating charts, either to add to a dashboard or by using Metrics Explorer, see:
The availablility and location of some of the chart controls varies between charts on a dashboard and Metrics Explorer charts. On the dashboard, most controls appear on the dashboard toolbar:
Some of these are dashboard-specific, and some apply generally to charts. On a chart in Metrics Explorer, controls appear on a similar toolbar just above the chart itself.
On the dashboard toolbar, the chart controls include:
- Reset Zoom, the magnifying-glass icon
- Auto Refresh, the chasing-arrows icon
- Settings, the gear icon (dashboard toolbar only)
- Time, the list of time periods starting with
Other controls are not chart-specific. All of them have tooltips that appear if you hover on them.
Additionally, each chart on a dashboard has three per-chart control icons opposite the chart's title:
- 4 stacked bars: Toggle Legend, turns the display of the legends on and off
- 4 corners: Fullscreen, fills the browser with the selected chart
- 3 stacked dots: Other options, lets you do things like change the chart mode of the selected single chart
These options can also be set for all of the charts on the dashboard by choosing an option from the dashboard Settings. For example, you can show or hide the legends of all charts.
Exploring the charted data
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 table under the chart—which associates the color used in the chart to a specific time series. The legend may or may not be currently displayed for charts in 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 chart for a metric containing several time series. The time selector is positioned along a rising line in the graph.
This page 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:
- Displaying legends.
- 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.
Showing and hiding legends
On a chart in a dashboard, the Toggle Legend icon, consisting of 4 stacked bars in the upper right area of the chart, shows or hides that chart's legend. For charts on a dashboard, you can also show or hide the legends for all charts from the dashboard Settings icon.
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.
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.
Controlkey and the bar 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 Metrics Explorer page, a Reset Zoom button 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. The display period set for a dashboard 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 charts
By default, charts are dynamic: as new data is generated, it is added to the chart, and older data moves off. You can toggle this behavior on and off with the Auto Refresh button.
The Auto Refresh toggle (chasing arrows) button is next to the Reset Zoom (magifying glass) button on the dashboard toolbar:
When this option is enabled, the button is black, and the chart displays new data as it is generated.
To stop taking in new data, click the Auto Refresh option. This prevents the chart, or all charts on a dashboard, from changing. This option is is useful when you want to analyze events within a specific time period.
The Auto Refresh button turns red when auto-refresh is disabled.
When building a chart on the Metrics Explorer page, the auto-refresh option is enabled. There is no way to disable it on the Metrics Explorer chart through the interface. You can disable it by editing the "share" URL.
Enlarging a chart
You can enlarge a chart on a dashboard by clicking the Fullscreen icon, consisting of four outward-pointing corners, in the upper right area of the chart.
This choice displays the chosen chart at the size of the browser window. The resulting chart is an active chart, not a screenshot.
When a chart is displayed this way, the icon changes so that the corners point toward the center. Clicking on this icon restores the dashboard view.
Charts on a dashboard have a context-dependent set of additional options. These are available on the Other options icon, consisting of 3 stacked dots, in the upper right area of the chart.
By clicking the stacked-dots icon, 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 implicated in 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 stacked-dots icon on the chart and selecting the desired mode. You can also set the mode for all charts on a dashboard from the Dashboard Settings icon.
For more on using these other chart modes, see Chart modes.
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 (3 stacked dots) 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.