-
|
I'm looking how to render bar chart labels using
Text is overflowing from the container.
Here is Codesanbox Help me to fix overflowing of the text. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
Hi, this is due to chart margin. If you increase your margin there will be enough room for the tick to show. Technically it "fits within the chart" so it shows, but its very long and at the moment the tick is not aware of the edge of the char so it goes outside the bounds of the chart and gets cut off. To work around this you can do things like rotate your labels or use Here is a modified version of your sandbox https://codesandbox.io/p/sandbox/line-chart-of-different-axis-intervals-forked-dx54zp |
Beta Was this translation helpful? Give feedback.




Yep it's preserved on purpose and is not a bug - that's the "preserveStart" part. Some people want to see that first (or last or both) tick no matter what. What you want probably is just "equidistant" without preserving anything. I've been wanting to work on that but we need to release 3.0 first.
Recharts has a lot of places where extra work needs done on the implementers side to make things look decent. This is one of those things - they're implemented features.
And oops, I did change the sandbox. I'll find the right link when I get a moment