Wrong height calculation #6217
Closed
Wrong height calculation #6217
Comments
There's a reason for it - see https://github.com/highcharts/highcharts/blob/v5.0.6/js/parts/Chart.js#L590. However it can be discussed whether we should respect an IE7 bug in 2017... |
Sorry I did PR faster than I should :-) |
This patch should solve that issue. |
Actually I can't replicate the scenario in IE7 where this happened. I've tried the following script with different doctypes and it always alerts 0: <html>
<head>
</head>
<body>
<div id="container">
<!-- comment -->
</div>
<script>
alert (document.getElementById('container').offsetHeight);
</script>
</body>
</html> So I think it is safe to assume that this only happened in the environment that Highcharts was first developed, and probably as a consequence of some CSS setting there. I'm publishing a commit where the 19px threshold is removed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behaviour
Container defined height should be respected by highchart
Actual behaviour
Container height less then 20px only works when chart height is set in options. Without chart high is set to default.
Live demo with steps to reproduce
http://jsfiddle.net/kakvbfns/2/
Test 1: Remove 'height: 16,' from options
Test 2: Set container height to 20px or more
Affected browser(s)
All
The text was updated successfully, but these errors were encountered: