In my code, I am generating high charts. The first time it is called, the following SVG code is generated:
<svg version="1.1" style="font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif;font-size:12px;" xmlns="http://www.w3.org/2000/svg" width="690" height="475">
The default width of 690 causes the chart to extend beyond my screen. However, after clicking a button to generate the same chart again, the new SVG code has a width of 491:
<svg version="1.1" style="font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif;font-size:12px;" xmlns="http://www.w3.org/2000/svg" width="491" height="475">
This width of 491 fits perfectly on my screen. How can I ensure that the chart fits on my screen the first time it's displayed? Is there a way to fix its width without causing issues, such as when using the following code block?
chart: {
width: 400
}
This solution does not work on iPad.
Displayed Correctly (2nd time)
Displayed Incorrectly (1st time, due to container size limitations)