canvas chart resizes dynamically on window resize