Recharts 3: Tooltip does not display correctly in BarChart when `orientation="vertical"`
Dependencies check up
- [x] I have verified that I use latest version of all @mantine/* packages
What version of @mantine/* packages do you have in package.json?
"@mantine/charts": "8.2.2",
"@mantine/core": "8.2.2",
"@mantine/hooks": "8.2.2",
"recharts": "3.0.2",
What package has an issue?
@mantine/charts
What framework do you use?
Next.js
In which browsers you can reproduce the issue?
Chrome
Describe the bug
Bug
When setting the orientation prop to vertical in <BarChart>, the tooltip does not display correctly.
Expected
The tooltips should behave the same as they do when orientation="horizontal"
If possible, include a link to a codesandbox with a minimal reproduction
https://codesandbox.io/p/sandbox/mantine-barchart-s6d7hq
Possible fix
No response
Self-service
- [ ] I would be willing to implement a fix for this issue
OMG, it was driving me crazy; I thought I'm doing something wrong.
Why is the Website example working fine? 🤔
EDIT: I'm using version 8.2.1, so I don't think it's a 8.2.2-specific issue (I have recharts 3.1.0)
I think the issue is with Recharts. When I use the same code with Recharts v2, it displays correctly, but it fails with Recharts v3
https://codesandbox.io/p/sandbox/d3x4hx
Weird, and checking out their releases, I feel like v2 shouldn't be used; quoting them for latest v2 version:
releasing since the @babel/runtime vulnerability is showing up in some security scans. Hoping to release 3.0 on 6/22 🚀
Or I'm misunderstanding and "hoping to release 3.0" doesn't have anything to do with deprecating v2
As mentioned in the release, Mantine was just updated to support Recharts v3, so there may still be some minor issues. Maybe check the diff to see what might be causing them
I'm having the same issue with Mantine 8.3.1 and rechart 3.2.1
The fix will be provided in Mantine 9.0 which is scheduled to release next year. For now, if the issue is critical for you, please downgrade to recharts 2.x until 9.0 release or workaround available.