Added note about maintainAspectRatio#5974
Merged
simonbrunel merged 2 commits intochartjs:masterfrom Jan 13, 2019
Merged
Conversation
Member
|
Thanks @janelledement. I would have expected the chart to resize to fit in its parent (something like CSS Your statement only applies to modifying the height, so I would update the example to also include changing the width: Then modify your note to be something like: |
etimberg
approved these changes
Jan 12, 2019
Contributor
Author
|
@simonbrunel Yes, I agree, thank you for the response! Change made |
kurkle
approved these changes
Jan 13, 2019
Member
|
Thanks @janelledement |
This was referenced Mar 4, 2020
This was referenced Mar 9, 2020
This was referenced Apr 14, 2020
exwm
pushed a commit
to exwm/Chart.js
that referenced
this pull request
Apr 30, 2021
Add a note about resizing the chart height with maintainAspectRatio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there,

This is rather a small documentation request, but do you think it might be worth it to explicitly say in the responsive.md file that in order for the given example to work, maintainAspectRatio property must be set to false? Here is a screenshot of the part I'm referring to:
I realize that in the example codepen you provide, the said property is set to false. However, when I created my first chart, I just ran what I saw on the page above, then scratched my head for a while when it didn't work as I expected it to. I ended up comparing my code with the codepen example and eventually figured it out.
I'm thinking that by making a small note about the property on the documentation page might cost someone less mental overhead and time in the future.

Thanks for your consideration!