proper scaling and responsiveness when resolution changes
The chart keeps scaling, getting bigger and bigger by the second
Please share a test case that reproduces your issue.
I've seen this as well. My situation is in the context of Bootstrap, but I've been able to repro it without bootstrap with the following CSS and element hierarchy:
```
```
To reproduce, in Chrome, zoom the window to 90% via Cmd-Minus
@simonbrunel was wondering if you could please remove the 'needs test case' label from this issue?
@glenn-barnett sure (and thanks), here is the associated codepen: https://codepen.io/anon/pen/OrwKRO
Thank you @simonbrunel ! I'll make a codepen next time.
Note: found that putting table-layout: fixed on the display:table element seems to prevent the issue.
I did find a workaround by simply fixing the heigh of the canvas.
Like @glenn-barnett said, it happens when used with bootstrap (in my case it's with Medtronic portlets, which uses bootstrap)
+1. Same problem here, and I haven't found any propper solution.
Similar issue: #5805
All found workarounds didn't work with one exception: set canvas height + weight directly via style and set the chart option responsive: true; but __don't__ set maintainAspectRatio to false!
Sample for canvas and chart options:
<canvas id="events" style="height: 80px; width: 400px;"></canvas>
options: { responsive: true, ... }
__In this case height and width are not used as real, but as ratio!__ It's fully responsive for all sizes and widths. In my case I've set height dynamically in PHP dependent on count of result elements:
<canvas id="userEvents" style="height: <?php echo $height?>px; width: 400px;"></canvas>