Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Function for changing target/source coloring of Sankey

I have a 3 dimension Sankey chart that I would like to have the links colored based on the source for the first link (between dimensions 1 and 2) and colored based on target for the second link (between the 2nd and 3rd dimension).

How do you detect which link you're on? I'm trying to do this:


Labels (3)
3 Replies
Contributor II
Contributor II

Anyone... crickets...

Contributor II
Contributor II


I have the same needs but Im still trying to find a way to do this..

Tried with dimensionality() or fixing SOURCE/TARGET to field value but from what I understand, SOURCE/TARGET is applied to the whole links.

I also tried by fixing links color on field value, like : if(Dim1='A',Red(),if(dim1='B',Green(),if(dim2='AA',Blue()))) but the colors only apply to the first dimension throughout the whole chart, splitting your second links from your first dimension.. 


Has anyone found an easy way to do this? I am currently testing several data viz services to decide which our team will choose. 

I am not much of a coder since if we pay for a service, I would expect it to offer straightforward tools or at least instructions on how to change the colour of the links in multimodal Sankey Graphs (or alluvial plots). Per my understanding, the whole point of the graph is to visualize the flow or connections of multiple dimensions, and if you have just lines with similar colour, it does not make much sense.

It makes it even more frustrating when they show this feature in function in tutorials, but to exact advice on how to do it. 


I am a bit disappointed since Qlik seemed one of the most promising "full-stack" services for data analysts without extensive coding experience. Even my husband, who has been doing full-stack coding for decades, said that this went over his head when I linked him to the Github materials provided elsewhere in this forum:  forum. https://github.com/jonvitale/SenseColorableSankey