-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Responsive chart shrinks only #1169
Comments
👋 any update on this? |
Hi! You should wrap the chart component within a More on this: https://www.chartjs.org/docs/latest/configuration/responsive.html Working example (based on the one you are referring to): here Note that the |
@diegotraid thanks for your answer! I'm a bit surprised this configuration isn't the default one as responsive widgets are more or less the default 😄 I'll implement your suggestions. |
Every example from your websites: https://react-chartjs-2.js.org/examples and https://www.chartjs.org/docs/latest/samples/information.html suffers from this bug: the charts only shrink. @diegotraid |
Sorry about the wrong link, check again. |
Hey, @vrde and @diegotraid, I found that adding an explicit
Hope that works for you, too. |
Would you like to work on a fix?
Current and expected behavior
I was checking the docs for the Line component and I noticed that if I resize the preview and make it smaller the chart shrinks (that is correct), but when I give it more space it doesn't grow, try it here https://react-chartjs-2.js.org/examples/line-chart/
Reproduction
https://react-chartjs-2.js.org/examples/line-chart
chart.js version
the one used by the docs
react-chartjs-2 version
the one used by the docs
Possible solution
No response
The text was updated successfully, but these errors were encountered: