Skip to content
\n

example below when i put a separator (br element) after the separator
\n\"Screenshot

","upvoteCount":2,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

Okay I pulled this down and took a look.

\n

Basically recharts piechart does not currently adjust when the size of the chart itself changes. The size of the screen yes, but since you are only rendering 180 to 0 (half a circle) the container is still assuming you are taking up double that space.

\n

commenting out your startAngle/endAngle makes that relatively evident.

\n

If you want you can create a separate issue that details this, sorry for the inconvenience!

\n

A hacky way to get around it for now is to add a whole lot of negative bottom margin (like -250)
\n\"image\"

","upvoteCount":0,"url":"https://github.com/recharts/recharts/discussions/3846#discussioncomment-7278088"}}}
Discussion options

You must be logged in to vote

Okay I pulled this down and took a look.

Basically recharts piechart does not currently adjust when the size of the chart itself changes. The size of the screen yes, but since you are only rendering 180 to 0 (half a circle) the container is still assuming you are taking up double that space.

commenting out your startAngle/endAngle makes that relatively evident.

If you want you can create a separate issue that details this, sorry for the inconvenience!

A hacky way to get around it for now is to add a whole lot of negative bottom margin (like -250)

Replies: 1 comment 17 replies

Comment options

You must be logged in to vote
17 replies
@ckifer
Comment options

@yusuf8ahmed
Comment options

@ckifer
Comment options

@ckifer
Comment options

Answer selected by ckifer
@yusuf8ahmed
Comment options

@ckifer
Comment options

@nikolasrieble
Comment options

@ckifer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants