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
XAxis allowDuplicatedCategory={false} disables BarChart custom tooltip. #4108
Comments
Facing the same issue with the LineChart. By not passing allowDuplicatedCategory={false} the Line doesn't draw fully, but if I pass it I'm missing 80% of Tooltips. |
@sream can you make a reproduction? Where the above doesn't affect the data, its more important when it does |
@ckifer During the creation of the reproduction I've noticed that I've passed the series directly to the LineChart data property and also rendering Lines with it. The weird part is that it even with this obvious misconfiguration it managed to show two tooltips correct but the rest was hidden. Could be connected to the issue mentioned above. |
Here's the completed misconfigured reproduction: CodeSandbox Maybe it's mentioned somewhere inside the documentation. It would be better if there is a warning of some sort for the developer since the library is built super reusable mistakes like this surely can happen during the initial getting to know. |
I see. Generally, everything is easier when all your data for the chart is in one array. In this case you have specific series which rely on different dataset causing the need to specify |
The issue which is not created via https://recharts.github.io/recharts-issue-helper will be closed immediately.
注意:不是用 https://recharts.github.io/recharts-issue-helper 创建的 issue 会被立即关闭。
The
allowDuplicatedCategory
prop, if set to false on the<XAxis/>
component disables the tooltip somehow. It still sends a state update to the tooltip component, but the payload property is always an empty array. Wasn't a huge deal breaker for my own application, but thought I'd leave this here for whoever comes across a solution...The text was updated successfully, but these errors were encountered: