How to generate data for different level in Sankey Diagram

37 Views Asked by At

Sankey diagram to generate: 3 levels of data where first level have 8 data, second level have 4 data and third level have 5 data.

Using data below, 2nd Level Data 2 till 4 display same level as 3rd Level Data.

const data = [
    ['From', 'To', 'Weight'],
    ['1st Level Data 1', '2nd Level Data 1', 5],
    ['1st Level Data 2', '2nd Level Data 2', 1],
    ['1st Level Data 3', '2nd Level Data 3', 1],
    ['1st Level Data 4', '2nd Level Data 4', 1],
    ['2nd Level Data 1', '3rd Level Data 1', 5],
]

The link can't be hide The data is using value -1 so to make the second level data to remain in 2nd column but cannot make the link hidden

I want to display all Level Data in same column where all data in first level pointed to all data in second level, there is only 1 data in second level pointed to all data in third level and remaining 3 data stop at second level.

0

There are 0 best solutions below