Sankey charts display a flow from one set of values to another and are effective for analyzing movements of information over time. This article provides an overview of sankey charts and configuration options in Looker Studio.In this article:
Sankey charts are best used for depicting a many-to-many mapping between two domains or multiple paths through a set of stages. For example, a sankey diagram can effectively visualize the relationship between universities and majors or display how web traffic flows through the different pages on a website. This visualization is best used when a dataset includes multiple dimensions that are related to each other in a hierarchical and sequential way.
A sankey chart connects data through nodes. The connections between the nodes are called links.
The nodes that links flow from are called source nodes. The nodes that links flow to are called target nodes.
The thickness of the links is also referred to as weight, which is commonly a representation of an aggregation or a metric. The higher the metric value, the thicker the link or higher the weight.
The following sankey chart displays the count of trips between countries using the default style settings.
The nodes are countries based on two dimensions, Arrivals and Departures. The links flowing between the nodes display the Record Count metric as the Weight metric. The data renders as a multi-stage sankey chart because of the way the Arrivals and Departures values correspond in the dataset.
You can interact with sankey charts in a couple of ways:
- You can highlight the relationship between specific links and nodes by selecting them in a sankey chart.
- You can hover your cursor over a link to access a tooltip that displays more details about the link.
A sankey chart requires the following elements:
- Two dimensions:
- A dimension that represents nodes where data flows to (also known as the target)
- A dimension that represents nodes where data flows from (also known as the source)
- One metric to indicate the weight (thickness of the links) between the nodes
Configure the chart
Add a new chart or select an existing chart. Then, on the right, use the Properties panel to configure the chart's Setup and Style tab properties.
A data source provides the connection between the component and the underlying dataset.
- To change the chart's data source, click the current data source name.
- To view or edit the data source, click . (You must have at least view permission to see this icon.)
- Click +BLEND DATA to see data from multiple data sources in the same chart. Learn more about data blending.
Default date range
The Default date range property lets you set a timeframe for an individual chart.
Default date range options
|Uses the default date range, which is determined by the chart's data source.
|Lets you use the calendar widget to select a custom date range for the chart.
|Date compare type
|Displays comparison data for the selected time period.
Dimensions are data categories. Dimension values (the data contained by the dimension) are names, descriptions, or other characteristics of a category.
The value of the Weight metric indicates the thickness of the links between nodes: The higher the value, the thicker the link. Sankey charts require at least a single metric.
Metrics measure the things contained in dimensions and provide the numeric scale and data series for the chart.
Metrics are aggregations that come from the underlying data set, or that are the result of implicitly or explicitly applying an aggregation function, such as COUNT(), SUM(), or AVG(). The metric itself has no defined set of values, so you can’t group by it as you can with a dimension.
The Row limit controls the number of records that are included in a visualization's query. Select a row limit of up to 5,000 from the drop-down menu as desired.
Cross filter options
When Cross-filtering in the Chart interactions section is enabled, you can select an option from the Cross filter options drop-down menu to filter other charts in the report by a node or link that a user selects in the visualization.
Google Analytics segment
This option appears for charts based on a Universal Analytics data source.
A segment is a subset of your Analytics data. You can apply segments to your Looker Studio charts to help ensure that your Looker Studio and Google Analytics reports show the same data. Learn more about Analytics segments in Looker Studio.
The Cross-filtering option in the Chart interactions section lets you interact with one chart and apply that interaction as a filter to other charts in the report. When cross-filtering is turned on for a chart, you can filter the report by interacting with that chart in two ways:
- Clicking one or more dimension values in the chart
- Dragging, or "brushing," your mouse across a time series, a line chart, or an area chart
These options control the color of the sankey visualization:
|Displays values in various shades of the same color
|Displays values in order of the node size, which reflects the value of the Weight metric
|Displays dimension values in colors assigned from the Manage dimension color values menu
These options control the appearance of the value labels that appear in a sankey chart. Each option lets you specify the following:
|Specify the color of value labels from a color palette pop-up.
|Specify the size of value labels in pixels from a series of drop-down menu options.
|Specify the font family of value labels from a series of drop-down menu options.
When the Bold checkbox is selected, value labels appear in bold font.
The Link color mode and Iteration drop-down menus control the appearance of the links that flow between nodes in a sankey chart.
- The Link color mode drop-down menu contains several options that let you select the way links appear in sankey charts:
|Displays links in gray and nodes by the option specified in the Color by section
|Displays links in the same color as the source node
|Displays links in the same color as the target node
|Displays links in a color gradient between a source node's color and target node's color
- The Iterations drop-down menu lets you select a number that specifies the placement of nodes for optimal readability. The larger the selected number, the more pleasing the layout of complex sankeys.
The Node thickness and Node padding options control the appearance of nodes in a sankey chart.
- The Node thickness drop-down lets you specify the thickness for each node. The higher the number, the thicker the node.
- The Node padding drop-down lets you specify the padding around each node and control the spacing between links. The higher the number, the more compact the node and the more spacing between links.
This option appears when your time dimension is missing data. Looker Studio offers 3 ways of dealing with this situation.
Note: this option has no effect on bar series. The Line to Zero option will affect a trendline, however.
|Line to Zero
|When you select this option, a line series will drop to zero for the missing dates. This is the default option.
|When this option is selected, missing data appears as breaks in the data series.
|When this option is selected, Looker Studio will continue the series by connecting the data points on either side of the missing data.
Background and border
These options control the appearance of the chart background container.
|Sets the chart background color.
|Adds rounded borders to the chart background. When the radius is 0, the background shape has 90° corners. Border radius of 100° produces a circular shape.
|Sets the chart opacity. 100% opacity completely hides objects behind the chart. 0% opacity makes the chart invisible.
|Sets the chart border color.
|Sets the chart border line thickness.
|Sets the chart border line style.
|Add border shadow
|Adds a shadow to the chart's lower and right borders.
The chart header lets viewers perform various actions on the chart such as exporting the data or sorting the chart. The following chart header options are available:
|Show on hover (default)
|Three vertical dots appear when you mouse over the chart header. Click these dots to access the header options.
|The header options always appear.
|Do not show
|The header options never appear. Note that report viewers can always access the options by right-clicking the chart.
|Sets the color of the chart header options.