-
Notifications
You must be signed in to change notification settings - Fork 158
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
yAxis Label width not accounted for in line chart width #734
Comments
Hi @nat-jones 👋 |
Hey @Abhinandan-Kushwaha ! Here is the code and data.
|
It's happening to me as well; it would be great to have an update on this. |
Have you found any workaround in the meantime @nat-jones ? |
After reading the props documentation, it states that it automatically adjusts the barWidth and spacing. It would be great if this could work in conjunction with a custom barWidth, so that only the spacing is calculated automatically |
@quememo My only workaround is to use margins of different absolute sizes on either side of the chart so it appears centered. Not ideal, but looks ok. |
@Abhinandan-Kushwaha Any update on this? Still seeing the issue. |
Expected Behavior:
Chart should be rendered entirely inside it's parent component with no overflow.
Actual Behavior:
The yAxis label pushes the chart over the right edge of the parent element
Line charts overflow their parent container width by exactly the width of the y axis label. Above, both the y axis label and the parent container width have a borderWidth set to 2. You can see that the chart extends off the edge of the parent View by the width of the y axis label.
Additionally, hideYAxisText prop should prevent the label from rendering entirely, which will result in a centered chart when the label text is hidden.
The text was updated successfully, but these errors were encountered: