Search code examples
highchartssankey-diagram

Highcharts sankey diagram node representation empty space


I have succeeded to have in a sankey diagram multiple nodes that have the same origin and same destination with different colors:

enter image description here

(the first blue and first pink aim at the same, second and third too).

But I'd like to make those length proportional to some absolute value, which could be achieved by adding an extra space in the node representation:

enter image description here

Is this achievable?

I tried to add some links with same origin and destination, but it doesn't do what I need. :(

Thanks


Solution

  • I found a solution by adding a link with outgoing: true and color: transparent.

    {
      from: this.to[0].name,
      weight: 1000000,
      color: 'transparent',
      outgoing: true,
    }
    

    Example: https://jsfiddle.net/18t92rg7/2/