Skip to content
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

Bar chart console errors #6800

Closed
1 of 2 tasks
crowbait opened this issue Sep 10, 2024 · 6 comments · Fixed by #6810
Closed
1 of 2 tasks

Bar chart console errors #6800

crowbait opened this issue Sep 10, 2024 · 6 comments · Fixed by #6810

Comments

@crowbait
Copy link

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.12.2

What package has an issue?

@mantine/charts

What framework do you use?

Vite

In which browsers you can reproduce the issue?

Chrome

Describe the bug

Using bar charts, the following errors pop up in the console (I'm aware the defaultProps one is known, I'm including it for completeness):

Warning: XAxis: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
    at XAxis2
    at svg
    at Surface
    at div
    at ChartLayoutContextProvider2
    at CategoricalChartWrapper
....
Warning: YAxis: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
    at YAxis2
    at svg
    at Surface
    at div
    at ChartLayoutContextProvider2
    at CategoricalChartWrapper
...
Warning: React does not recognize the `parentViewBox` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `parentviewbox` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    at text
    at BarLabel
    at Label
    at g
    at LabelList
    at g
    at Bar2
...
Warning: React does not recognize the `textBreakAll` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `textbreakall` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    at text
    at BarLabel
    at Label
    at g
    at g
    at Bar2

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
@Kenzo-Wada
Copy link
Contributor

Kenzo-Wada commented Sep 10, 2024

Im afraid this is a bug of recharts side, not mantine

@rtivital
Copy link
Member

Issue with recharts, not Mantine. See recharts/recharts#3615

@crowbait
Copy link
Author

Issue with recharts, not Mantine. See recharts/recharts#3615

This does not explain half of the errors I posted.

@ckifer
Copy link

ckifer commented Sep 11, 2024

Recharts maintainer here. This is taken care of in recharts alpha as stated in the linked issue. I was waiting for R19 to release until releasing 2.13 but we'll see what that looks like.

As for the other errors unrelated to the defaultProps warnings I can check to see if some unwanted props are getting spread onto the text elements in Label. This could also be a custom implementation thing on this side, not sure yet.

@ckifer
Copy link

ckifer commented Sep 11, 2024

@Kenzo-Wada
Copy link
Contributor

@ckifer

thanks! Ive made a PR!
#6810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants