Sankey Chart

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.

Inputs

Metrics: 1 metric Attributes: 2 or more attribute Use as Filter Option - Available

sanky inputs

Data labels

We can enable or disable the node labels and link labels. You can see the attached screenshots below.

Sankey inputs

We can format the links and nodes accordingly.

Sankey inputs

Thresholds

In the business point of view, certain part of the chart needs to be highlighted to draw more attention from the desicion makers. For example, highlight the stores where total sales is greater than a specific value or highlight the top 10 products whose sales is high during last year’s winter. Thresholds are very useful objects in these use cases.

Thresholds will display some conditional formatting in a chart to highlight certain data points depending on predefined criteria.The criteria are attribute or metric qualifications. If a qualification’s expression evaluates to TRUE, the report displays the threshold. We can also include markers in thresholds.

To apply thresholds in vitara charts, hover the cursor on the chart. Vitara chart will display an ‘Edit’ button. When you click on this ‘Edit’ button the properties window will pop out. Select the thresholds tab to open threshold editor. In the window you can add a new threshold or delete any existing threshold or modify the existing threshold.

Note: From 4.6 version we can apply thresholds using attributes. The source drop down box in the threshold editor window will list all the attributes and metrics in the chart. we can select an attribute as source and define a threshold condition.

sanky threshold add

In the threshold editor window apply source, target, threshold condition and the other related information to set a threshold on the chart.

sanky threshold condition

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 property

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.

sanky threshold condition

sanky threshold condition

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.

sanky threshold condition

sanky threshold condition

Background Image

The steps to set a background image for all Vitara charts are explained in backgroundImage.

New data model - Introduced in 4.5 release

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.

Difference between the existing model and the new model:

Example 1:


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

sanky newdatamodel

Example 2:


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:

sanky newdatamodel

Existing Model:
Existing model will need three attribute columns to represent the nodes.

Attr1 Attr2 Attr3 Metric
A B C 10

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.

Attr1 Attr2 Metric
A B 10
B C 10

Configuring Source and Target:

Example 3:

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.

sanky newdatamodel

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. 

sanky newdatamodel

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.

sanky newdatamodel

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.

sanky newdatamodel

sanky newdatamodel

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.

sanky newdatamodel

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

sanky newdatamodel

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.

Configuring Depth/Direction:

Example 4:

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.

sanky newdatamodel

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.

sanky newdatamodel

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.

sanky newdatamodel

Sankey chart with web navigation example:

sanky newdatamodel

In the below screenshot, the ‘product → cart’ navigation is highlighted in all the three levels.

sanky newdatamodel

Order of Source, Target, and Depth attributes in the editor panel:

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.

Example 5:

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.

sanky newdatamodel

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.

sanky newdatamodel

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.

sanky newdatamodel

Instead the correct flow of events should be as shown below.

sanky newdatamodel

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.

sanky newdatamodel

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.

Sankey Chart Vertically

From the version 5.0, Sankey chart now stands an ability to use the charts in vertical orientation. The following can be turned ON from the appearance tab from the property editor window. Just toggling on the Invert Axis feature we can change the orientation of the chart.

sankey