-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make cartesian charts responsive #32824
base: usr/atisjai/chartsV9
Are you sure you want to change the base?
Make cartesian charts responsive #32824
Conversation
|
||
/** | ||
* Enables the chart to automatically adjust its size based on the container's dimensions. | ||
* @default false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make default to be true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't work well when enableReflow prop is true. The chart gets truncated below min width but scrollbar doesn't appear because svg width is set to 100%.
Will have to disable reflow in all examples. Should I apply this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think this is better than enable reflow solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this solution is better if all the overlapping issues are fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, here the bars ( in VBC ) or lines (in LineChart) will get overlapped if we decrease chart size beyond a certain limit ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For bars, we have already fixed the overlapping issue and lines dont have this issue. Currently, only the x-axis tick labels overlap in smaller viewports.
Previous Behavior
Cartesian charts adjust to the container size only when the width and height props are updated or when the component mounts (e.g., on page load).
New Behavior
With the responsive prop set to true, cartesian charts automatically resize in response to changes in the container size.