m_b_e_m_ch_p_tt
Posts: 3
Joined: Fri Sep 10, 2021 1:17 pm

Sankey - How to set max link width?

Hello,
I'm currently using the Sankey Diagram from the Highcharts package and when I have a small number of nodes, the thickness of lines is too large.
You can see this issue on this page.

https://jsfiddle.net/z43qL8b5/

How can I consider a max thickness for lines?


Thank you in advance.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Sankey - How to set max link width?

Hello m_b_e_m_ch_p_tt,

Thanks for contacting us with your question.

Unfortunately we do not have a such option and it is not possible to achieve something like that from an API level. By default chart's plot try to fill whole available space. In effect, when there are only few nodes, they are thick. If you don't like that behaviour and you would like to see an option which would allow to set max thickness then I highly encourage you to leave your feedback on Highcharts User Voice or create freature request ticket github.
User Voice: https://highcharts.uservoice.com/forums ... script-api
Github:https://github.com/highcharts/highcharts/issues

Alternatively you could try to extend a function that is responsible for calculating node width. More about it you can read here: https://www.highcharts.com/docs/extendi ... highcharts

Let me know if you have any further questions!
Best regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”