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
recharts responsive pie chart with legend #4487
Comments
Nothing magic in ResponsiveContainer - if your content is too large it will begin to overlap. SVGs require absolute positioning and so make things like true responsiveness, text wrapping, etc. difficult. So yeah this could be an enhancement, but in general this is how recharts has worked for a long time. Potential enhancements: collision detection, making legend relatively positioned (this would introduce regressions, probably not the right thing to do), scaling on resize (this also maybe unwanted behavior depending on the use-case) A lot of things to consider in order to get to a place where this is nicer unfortunately |
Great, thanks for the clarifications! |
I have a problem when showing the Pie and the legend. Apparently, if the legend is to wide, it tends to remove space from the pie chart. Shouldn't the responsive container calculate the values to set an appropriate overall width??
The text was updated successfully, but these errors were encountered: