Responsive charts with bootstrap (or probably any other layout system)
Open
type: documentation
- Dominant language
- JavaScript
- Stars
- 67.7k
- Forks
- 11.9k
- Avg merge
- 7h 39m
- Merged PRs (30d)
- 5
Description
### Documentation Is:
- [ ] Missing or needed?
- [ ] Confusing
- [X] Not sure?
### Please Explain in Detail...
The docs at https://www.chartjs.org/docs/latest/configuration/responsive.html suggest a way of responsive sizing based on the viewport size, which often isn't appropriate.
### Your Proposal for Changes
Using the `aspect-ratio` property it's possible to make a chart fit nicely within the parent container's width instead of the window size. `overflow: hidden` is also needed otherwise the height won't change and trigger a redraw.
```html
```
### Example
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.