fix: graph rendering too wide when heading title is too long #812
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.
The graph would previously render at the max width of either the card or the header, which if the header was too wide for the display would mean part of the graph would render outside of the card.
For me, I use small apex charts inside of Grid Cards and while the title of some of my charts easily fit in the charts on larger screens like computers and tables, on mobile phones the title is wider than the card and so part of the graph is rending outside of the card and is hidden even with only 1 or 2 words in the title.
Here is an example dashboard showing the problem. The only difference between the 2 charts is the length of the title.
Before this change, it looks like this. Notice the parabola on the left is missing part of the right-hand side
And after this change, it displays the whole chart