An explicit height for the chart. Detecting when the canvas size changes can not be done directly from the canvas element. Why hasn't the Attorney General investigated Justice Thomas? At that moment we already know precisely how many bars we have, so we can calculate our target height for the chart container. Change the height according to yourself, for me 500px just works fine ;), Just to add on to the answer given by @numediaweb. First, add anychart.onDocumentReady () as shown below: <script> anychart.onDocumentReady (function () { // The main JS line charting code will be here. 12 gauge wire for AC cooling unit that has as 30amp startup but runs on less than 10amp pull, Put someone on the same pedestal as another. Why hasn't the Attorney General investigated Justice Thomas? Chart.js renders chart elements on an HTML5 canvas unlike several other, mostly D3.js-based, charting libraries that render as SVG. Chart.js comes with a sound default configuration, making it very easy to start with and get an app that is ready for production. comes with the following built-in chart types: First, add a link to the providing CDN (Content Delivery Network): Then, add a