Open blueeDeveloper opened 2 years ago
Can someone pls update on this
Not showing labels when they overlap is a feature.
We could:
getStringSize
to consider rotation angle https://github.com/recharts/recharts/blob/0f1bd03a3f97b281d95846e88908e843e60c3d3e/src/util/DOMUtils.ts#L75nothing yet ?
If you want all labels to show up, you can just set the interval to 0.
You can find an nice example of how the axis behaves here https://master--63da8268a0da9970db6992aa.chromatic.com/?path=/story/examples-cartesian-cartesian-axis-tick-positioning--tick-positioning
To add to this, there has been some changes that do take angle into account now.
https://codesandbox.io/s/mixed-bar-chart-forked-msfmvc?file=/src/App.tsx
just add interval = {0} in XAxis:
<XAxis className="mt-8" dataKey={"name"} interval={0}
Reproduction link
Steps to reproduce
Xaxis
.What is expected?
Expected to show all the labels irrespective of their length
What is actually happening?
clipping off or hiding the label whose length is higher.