Chartjs-Chart.js responsive problem | scale with parent container which has max-width 800px not working

0👍

Somehow width: 100%; does not work, but 80vw or 90vw works… don’t ask me why.
And 100vw still has a bit of overflow (because of the scroll bar i think…)
I fixed it with the following code

#canvasContainer{
    border: 2px dashed blue;
    position: relative;
    width: 80vw;
    max-width: 600px;
    margin: 0 auto;
}

Leave a comment