Mark
Mark

Reputation: 4950

Highcharts Sankey customization

I can create the following chart:

Highcharts.chart('container', {

title: {
    text: 'Highcharts Sankey Diagram'
},
chart: {
     styledMode: false
},
plotOptions: {
    series: {
        // general options for all series
    },
    sankey: {
        curveFactor: 0,
        lineWidth: 1
    }
},
series: [{
        //minLinkWidth: 1,
    keys: ['from', 'to', 'weight'],
    data: [
            ['Root', 'Brazil', 0.01],
        ['Root', 'Canada', 0.005],
        ['Root', 'Mexico', 0.01],
        ['Root', 'USA', 0.01],
        ['Brazil', 'Portugal', 0.01],
        ['Brazil', 'France', 0.01],
        ['Brazil', 'Spain', 0.01],
        ['Brazil', 'England', 0.01],
        ['Canada', 'Portugal', 0.01],
        ['Canada', 'France', 0.01],
        ['Canada', 'England', 0.01],
        ['Mexico', 'Portugal', 0.01],
        ['Mexico', 'France', 0.01],
        ['Mexico', 'Spain', 0.01],
        ['Mexico', 'England', 0.01],
        ['USA', 'Portugal', 0.01],
        ['USA', 'France', 0.01],
        ['USA', 'Spain', 0.01],
        ['USA', 'England', 0.01],
        ['Portugal', 'Angola', 0.01],
        ['Portugal', 'Senegal', 0.01],
        ['Portugal', 'Morocco', 0.01],
        ['Portugal', 'South Africa', 0.01],
        ['France', 'Angola', 0.01],
        ['France', 'Senegal', 0.01],
        ['France', 'Mali', 0.01],
        ['France', 'Morocco', 0.01],
        ['France', 'South Africa', 0.01],
        ['Spain', 'Senegal', 0.01],
        ['Spain', 'Morocco', 0.01],
        ['Spain', 'South Africa', 0.01],
        ['England', 'Angola', 0.01],
        ['England', 'Senegal', 0.01],
        ['England', 'Morocco', 0.01],
        ['England', 'South Africa', 0.01],
        ['South Africa', 'China', 0.01],
        ['South Africa', 'India', 0.01],
        ['South Africa', 'Japan', 0.01],
        ['Angola', 'China', 0.01],
        ['Angola', 'India', 0.01],
        ['Angola', 'Japan', 0.01],
        ['Senegal', 'China', 0.01],
        ['Senegal', 'India', 0.01],
        ['Senegal', 'Japan', 0.01],
        ['Mali', 'China', 0.01],
        ['Mali', 'India', 0.01],
        ['Mali', 'Japan', 0.01],
        ['Morocco', 'China', 0.01],
        ['Morocco', 'India', 0.01],
        ['Morocco', 'Japan', 0.01]
    ],
    type: 'sankey',      
    nodeWidth: 100,
    name: 'Sankey demo series'
}]

});

Example enter image description here

What I need is to have all bands of a small width: about 1.5 mm and not relevant to actual value. What happens now, is that soon as I set all values to the same value the chart refreshes bands with the new width.

Thanks

Upvotes: 0

Views: 368

Answers (1)

Sebastian Wędzel
Sebastian Wędzel

Reputation: 11633

I am afraid that setting fixed link width is not possible in the current sankey implementation: https://www.highcharts.com/forum/viewtopic.php?f=9&t=47595&p=171541&hilit=sankey+link+sankey+link+width#p171541

Upvotes: 1

Related Questions