Expected behavior :
Normal non-looping “flow” in chart. Would show you if I was allowed to include more than one piece of media.
Actual behavior
Sankey chart that has a “flow” that loops out of frame since target is at same x-position:
Switching to mobile preview fixes this, and then it is also fixed fixed for desktop when switching back.
To reproduce (or link to chart/page which demonstrates the issue)
Make a Sankey chart with the similar flows and targets as the example. Mine are
Rettargang (from)
Rettargang (to)
Rettargang (weight)
Tingrett
Lagmannsrett
32
Lagmannsrett
Dømt
21
Høgsterett
Dømt
2
Lagmannsrett
Høgsterett
2
Tingrett
Dømt
4
Lagmannsrett
Frifunnen
9
Tingrett
Frifunnen
4
Høgsterett
Frifunnen
0
This was performed on Firefox: Version124.0.2, Build ID 20240401114208; on macOS: 14.4.1 (23E224)
Hi Henrik! Thanks for messaging and your patience
It looks like this issue is related to a known issue in the Highcharts libraries
opened 02:39PM - 20 Apr 18 UTC
Type: Enhancement
Status: Has workaround
#### Expected behaviour
sankey should be able to render a->b->a
#### Actual… behaviour
sankey render incorrectly to b->a only.
#### Live demo with steps to reproduce
https://jsfiddle.net/zbnu6w36/
#### Product version
highcharts 6.1, but i think this does not work on all versions.
#### Affected browser(s)
all browser types.
A workaround may be to add the following custom code which enforces a re-render of the chart. Note that I have hardcoded width and height, so may have to adjust these to your needs
Highcharts.merge(true, options, {
chart: {
events: {
render: function () {
this.setSize(500, 500);
}
},
}
});