0👍
You may wish to unload the chart on resize, then reload it with the new size. It doesn’t take much. I’m sure any other research here for Javascript will be good, like refactoring code, it all comes in sweet little packages.
Remember that you can have your handlers setup to invoke upon certain changes and give them the attention you need to.
Source:stackexchange.com