Sankey Chart is designed to represent a flow from one set of values to another. It is the best way to use many-to-many mapping relationships between two dimensions. The things being connected are called nodes and the connections are called Links. Sankey is efficient and is very good showing particular complex information.
Metrics: 1 metric Attributes: 2 or more attribute Use as Filter Option - Available
We can enable or disable the node labels and link labels. You can see the attached screenshots below.
We can format the links and nodes accordingly.
We can set thresholds on metrics using any criteria to show specific colors on the chart. We can also enable data labels for only the values which are highlighted in thresholds. Open the property editor by clicking on the ‘Edit’ button and select the ‘Threshold’ tab.
In the threshold editor window apply source, target, threshold condition and the other related information to set a threshold on the chart.
We can set target of threshold either links or nodes. And also we can apply a threshold at node level or chart level. For example if we set threshold - top 1 apply red color, this top 1 can be in each node or in the entire chart.
After giving all inputs click on ‘Apply’ button.
Sankey chart have the ability to set custom colors for links. Links can be given custom color palette using their colors options.
Here, we select a ‘Caribbean Green Pearl’ color for links.
From 4.4.1 version of Vitara charts, we have a new update in Sankey chart where we can Highlight path of the links end to end. This makes is much easier to visualize.
When you hover on the link, you can see the whole relation of the specific link. Here’s an example of Links highlight from end to end.
The steps to set a background image for all Vitara charts are explained in backgroundImage.
In the existing sankey chart, the data flows from source node to the target node along the columns.
The new structure introduced is a more natural format for directed graphs like Sankey and also solves the limitations of current structure.
In the below screenshot there are three attributes - Year, Category and Subcategory. In the normal mode, vitara sankey chart will form nodes for each of these attribute elements.The links will flow from Year to Category, and Category to Subcategory.
Year → Category → Subcategory
To represent the flow from A to B and B to C, the difference between the existing data model and new data model is as follows:
Existing model will need three attribute columns to represent the nodes.
New data model:
The new data model requires two attribute columns as source and target. The Attr1 should be configured as the source and Att2 should be configured as the target.
Shopping flowchart data
In the below screenshot there are two attributes - Navigation Source and Navigation target. This data represents the flow of actions from one point to the next point in an online shopping page. For example, in an online shopping portal the user will be at different stages of actions till final payment.
In this example, let’s consider the flow of data in one branch as shown below:
Online Order → Order Submitted → Payment Verification → Credit approved/Credit Denied/Credit Review/Order Prepaid/Payment Denied/Processing Payment.
Vitara sankey chart in normal mode is not suitable for this type of data models where the links will originate from one attribute column and end at another attribute column.
Below is the screenshot of the sankey chart in normal mode, which will simply draw links from the Navigation Source attribute to the Navigation target attribute.
For these types of data where the data flows in rows, the new data model is useful.
To confinfigure the vitara sankey to work in the row data model, click on the ‘Edit’ button and expand the menu - Sankey.
In the Configuration attributes section you will find three drop down options -Source, target and depth/direction. These drop down boxes will list all the attributes present in the chart. We have to select the suitable attributes for the respective drop down boxes.
In the current example we don’t have any attribute elements repeating more than one time, therefore we don’t need to use the third attribute - Depth/Direction. The usage of the Depth/Direction option will be explained later in this document.
In the current example, the attribute ‘Navigation Source’ will be the source node and ‘Navigation Target’ attribute will be the target node.
Once we select the source and target attributes, the sankey chart will render in the row data flow model.
Below is the screenshot of the sankey chart after setting source and target attributes.
We can see the branch mentionened above in the sankey chart.
Online Order → Order Submitted → Payment Verification → Credit approved/Credit Denied/Credit Review/Order Prepaid/Payment Denied/Processing Payment
In addition to source and target options Depth/Direction attribute can be used to describe the flow of sankey. Depth can be used to make a node distinct within the flow path.
Website navigation data indicating users landing and navigation between different pages in a website.
In this example there are three attributes - Landing Page, Navigate To, and Level.
As per the given use case we can configure the attribute - ‘Landing Page’ as source of navigation and the attribute - ‘Navigate To’ as destination.
The limitation in this model is, we have the same transaction at multiple levels.
For example, as shown in the below screenshot, ‘Product → Cart’ navigation can happen in level 1,2 and 3.
If we don’t have the level attribute,Microstrategy will aggregate the row ‘product → cart’. Below are the possible flow paths that use ‘product to cart’ navigation.
1. Home → product, product → cart (Level-2), and cart → to home/shipping. 2. Product → cart (Level-1), cart → shipping, and shipping → order details. 3. Home → department, department → product, product → cart (Level-3).
Therefore to identify all these transitions uniquely at different levels, along with source and target attributes we need another attribute which will have information regarding depthness.
Below is the screenshot of sankey chart configuration with all these three attributes.
Sankey chart with web navigation example:
In the below screenshot, the ‘product → cart’ navigation is highlighted in all the three levels.
When we add an attribute to a visualization, by default Microstrategy will sort the attributes in alphabetical ascending order. Due to this, the natural order of the flow of events can be distrubed. The natural order of the events can be maintained by adding a new attribute form and sorting the attribute using the newly added attribute form.
The new attribute form should be created such that the order of the flow of events should be maintained.
Let’s examine closely the above web navigation example.
As per the given use case, below is the screenshot of the correct order of the occurrence of the events.
If we change the order of the attributes in the editor panel, the order of events will be disturbed.
In the below screenshot the position of the attribute ‘Level’ is changed, due to which the order of events will affect.
When I place the attribute ‘Level’ at the third position in the editor panel drop zone, Microstrategy will sort the attribute elements using the attribute ‘Navigate To’. Due to this the natural order of the events will disturb.
If we use this table to draw the sankey chart in the new data model, the final chart will look like as shown in the below screenshot.
Instead the correct flow of events should be as shown below.
To achieve this, according to the data in the above example, either the attribute ‘Level’ should be the first attribute in the drop zone so that Microstrategy by default will sort by ‘Level’ attribute or we should sort the attribute ‘Level’ in the ascending order.
The conclusion is, before drawing the sankey chart we should check the order of the events. The order of the events should be in the correct order as per the natural flow of our use case.
Add your data to a visualization. In the editor panel, check the order of the attributes which you are going to configure as Source, Target and Depth. The attributes order should not disturb the flow of events.