-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(react-charts): fix chart width issue in donut chart #35652
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
base: master
Are you sure you want to change the base?
Conversation
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
| @@ -0,0 +1,7 @@ | |||
| { | |||
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.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests-react-components/Charts-DonutChart 6 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Charts-DonutChart.Basic - Dark Mode.default.chromium.png | 9043 | Changed |
| vr-tests-react-components/Charts-DonutChart.Basic.default.chromium.png | 10058 | Changed |
| vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png | 5882 | Changed |
| vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png | 4731 | Changed |
| vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png | 5883 | Changed |
| vr-tests-react-components/Charts-DonutChart.Basic - RTL.default.chromium.png | 10059 | Changed |
vr-tests-react-components/Positioning 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Positioning.Positioning end.chromium.png | 728 | Changed |
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 868 | Changed |
vr-tests-react-components/TagPicker 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/TagPicker.disabled.chromium.png | 677 | Changed |
| vr-tests-react-components/TagPicker.disabled - Dark Mode.chromium.png | 658 | Changed |
There were 2 duplicate changes discarded. Check the build logs for more information.
| className={classes.chart} | ||
| aria-label={data?.chartTitle} | ||
| width={_width} | ||
| height={_height! + titleHeight / 2} |
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.
why titleHeight / 2
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.
adding titleHeight is increasing distance between legends and donut a lot.
to resolve above issue also (chart shifting downwards), I will transform pie by titleHeight/2, currently it is getting transformed by titleHeight which is increasing the gap
| legendContainer.current = e; | ||
| }} | ||
| className={classes.legendContainer} | ||
| style={{ marginTop: data?.chartTitle ? `-${titleHeight}px` : undefined }} |
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.



Related Issue(s)