Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Chart.setSize to allow setting only width or height #5513
When a chart is initialised with no specific width or height attribute, it fills the container. This allows the chart to grow/shrink with the width of the element/page.
I wish to be able to set the height of the chart without changing the width, as setting the width will prevent the chart from resizing with the browser.
I expect that calling
Errors are thrown in the console, graph resizing doesn't work.
Live demo with steps to reproduce
This demo has plenty of errors in the console, and is using the example chart:
This example is using a chart similar to the one in our application, and uses 4.1.4. Note this does not have errors when setting height:
Note that in our application we didn't have any errors for our specific graph resizing, as we were adjusting just the height on the graph and there was not an error thrown at that moment in time. We had to upgrade highcharts for another reason, and I have noticed that it appears to be Version 4.2.0 that introduced the issue I am seeing.
If any further details are required, please let me know.
Chrome Version 51.0.2704.106 (64-bit)
Thanks for reporting, this has been on the plan for a while. In the commit above, two new possible values for