Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

D3 Sankey Extension Node Duplicates

Hello,

I am using the D3 inspired Sankey extension for Qlikview (https://github.com/brianwmunz/d3sankey-QV11)

I am able to get the sankey diagram to work, however I am seeing an issue with node replication. Below is an example of the issue I am facing.

Sankey.PNG

As you can see, there are two nodes for Home -> Wallet.  Ideally, all the Home -> Wallet records should go to the same node, with a smaller subset flowing to Register Wallet.  Is this an issue with the Extension, or perhaps how I formatted the data?  I have included the sample data file used to highlight the issue.

Thanks for your help!

1 Solution

Accepted Solutions
adamdavi3s
Master
Master

Hi Adam,


Final update, just slightly tweaked it and made a checkbox for adding the number to the label.

All changes will now go via GIT (the new qar is on there)

https://github.com/adamdavi3s/QlikviewSankeyImproved

View solution in original post

22 Replies
Not applicable
Author

Qual dos graficos voce esperava?

Not applicable
Author

Hi Sorry for the delay, thank you for the response.  I have tried your suggestion before, however ideally I would want the unlabeled nodes to be eliminated. Any idea where in the code I can update that?

Thank You!

adamdavi3s
Master
Master

You should be able to have intermediaries as per Mike's example but I am not sure that the extension is handling this quite right.

If I get a chance I'll digest the code and see if I can come up with a better way of working with the nodes 

adamdavi3s
Master
Master

Bear with me.... just need to figure out the qlik data bit

Capture.PNG

Not applicable
Author

Ive begun looking at the code as well! But I am not a Jquery / Javascript user, so I look forward to what you come up with!

thank you!

adamdavi3s
Master
Master

Is this the sort of thing you were hoping for? (needs some tidying up before being released)

Capture.PNG

Current bugs:

1- its backwards

2- can't handle orphaned data (e.g. a source but no target)

3- small bug in the way the array is built which causes a loop with certain data

Not applicable
Author

Yes!! That would be exactly what I am looking for.  I am happy to Pad the data, ie add blank records for paths that are shorter than the longest path.  I was trying to pad the paths, then just not add those nodes to the sankey.  Not sure if that is a good / feasible option though and I havent gotten very far.

adamdavi3s
Master
Master

Same here, I had never looked at JS / JQ until a couple of months ago!

I've slightly rearranged it so it takes Source, Destination and Size as the arguments which means you need to change the data source a bit, but it makes more sense this way.

I'll get the rough one up ASAP

adamdavi3s
Master
Master

Nearly there, just trying to sort a click event to link it to data and then I think i'll be done