Expected Behavior
- When making the window bigger, chart should grow horizontally.
- When making the window smaller, chart should shrink horizontally.
Actual Behavior
✅ When making the window bigger, chart grows horizontally.❌ When making the window smaller, chart does not shrink horizontally.
Codepen
I was able to reproduce my issue on Codepen. There must be something wrong with my CSS, but I’m not sure what. It’s really straightforward grid css. If you have any advice how to make the chart better responsive inside the grid, I’d be really grateful!
https://codepen.io/mesqueeb/pen/xayNKK
Environment
- vue.js version: 2.5.17
- vue-chart.js version: ^3.4.0
Originally posted on the vue-chartjs repo but was redirected here.
You need to explicitly set
min-width
on your chart container (fiddle)Duplicate of #4156 (see this comment)