-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
highcharts prevent container being resized #5070
Comments
Could you reproduce this issue in a jsFiddle demo? |
Also see #4649 |
https://jsfiddle.net/rubyisapm/L5ftoctr/ |
WorkaroundBy setting the width of the container and the SVG, as well as calling |
Thank you so much for helping me out. @TorsteinHonsi :-) |
Another problem, poor me!! See here: https://jsfiddle.net/rubyisapm/L5ftoctr/5/ first, hide the right container you'll find the chart can't adapt the change. Even through I added the $(window).resize(), it didn't work either. Thank you |
Does it help if you run |
No, it doesn't work. But I found another way to fix it: I set the iframe's width from 100% to 99.9%, and it would trigger the iframe to resize itself, then the chart could reflow correctly. But if the chart is rendered in the main window, I'm afraid there hasn't no way I can think out to fix by now. |
You can try to call the setSize() method, which extracts width from container. |
I use flex layout in my project, the chart's container is one of the subs of the flex container. Like as following:
On the page, user can resize the firstSub.
The problem is:
If the chart hasn't been rendered when resizing the firstSub, the chartContainer would follow the operation, but if the chat has been rendered when resizing the firstSub, the chartContainer wouldn't follow the operation. Like the chart prevents its container being resized( like it says: don't touch me!-_-!!)
The text was updated successfully, but these errors were encountered: