javascript – Chart.js make pointRadius responsive

On Chart.js, is there a way to make pointRadius responsive? I have a chart that responds well to resizing but the pointRadius are constant.

On a wide screen, all good, but on mobile, the chart size is correct but I can’t get the pointRadius to scale down. I have tried a couple of JavaScript function to detect the size of the canvas and compute the pointRadius accordingly but I can’t get it to work.



Any elegant way to solve that problem? The Chart.js canvas is located within a Bootstrap 4 container.

Canadian Web HostingAvaHost.Net Web Hosting

Product of the Month September 2016

Source link

Leave a Comment

Your email address will not be published. Required fields are marked *