Sankey chart renders a looped "flow" out of frame, fixed if switching to mobile preview and back to desktop

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

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);
            }
        },
    }
});