0

Here's a fiddle. Click the button and see the change. The chart.setSize(null,null) causes the bubbles to resize, even though the chart's size hasn't changed.

(Note that this is the equivalent to resizing the chart to a different size and setting it back again (I originally detected the issue by restoring maximized window then maximizing again).)

I believe the bubble sizes after the resize are actually the 'correct' size; my actual use of the bubble chart updates the values using point.update(), which is where I noticed the change, even when figures weren't actually changing. So it would seem the initial render is incorrect?

mcNux
  • 1,472
  • 1
  • 15
  • 13

1 Answers1

0

Update

Use this workaround instead.

The previous workaround caused errors - using null arguments to setSize isn't supported, but happened to give the desired result. After a discussion on Highcharts forums I now have the following workaround. Note that one has to rebind to window resize after setting to a fixed size.

Original

As done in the OP JSFiddle example, using setSize() immediately after adding the chart will cause the resize of the bubbles to occur, setting them to their correct size.

var chart = new Highcharts.Chart(options);
chart.setSize(null, null, { duration: 0});

This appears to be a bug which I have raised on the Highcharts forums.

[Edit: setting animation duration to 0, to prevent the change in bubble size being visible as animation takes place]

mcNux
  • 1,472
  • 1
  • 15
  • 13