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

Error/Warning when rendering (Bar)Chart #577

Open
ricohumme opened this issue Apr 22, 2022 · 2 comments
Open

Error/Warning when rendering (Bar)Chart #577

ricohumme opened this issue Apr 22, 2022 · 2 comments
Labels

Comments

@ricohumme
Copy link

What is the problem?

When rendering the chart I get all kinds of errors like the following:

Warning: Received `false` for a non-boolean attribute `animate`.
If you want to write it to the DOM, pass a string instead: animate="false" or animate={value.toString()}.

Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Warning: React does not recognize the `animationDuration` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `animationduration` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Warning: React does not recognize the `renderPlaceholder` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `renderplaceholder` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

When does it happen?

This happens on web when rendering the following component:

<BarChart
      style={{ height: 200 }}
      data={chartData}
      svg={{ fill }}
      contentInset={{ top: 30, bottom: 30 }}
    />

chartData being an array of numbers and fill being a hex color value.

What platform?

This error is seen on web, I didn't get this on my Android simulator nor on iPhone.

react-native version: 0.63
react-native-svg-charts version: 5.4.0
react-native-svg version: 12.1.1

Code to reproduce

This snack shows the code I use, however in the console I can't see the errors I get in my browser console. which seems weird to me.
-->

@ricohumme ricohumme added the bug label Apr 22, 2022
@SamuelLeclerc33
Copy link

Bump, I also have this issue using the library with react-native-web. From what I've seen on another post (software-mansion/react-native-svg#1484), it seems that some properties are passed down but they shouldn't. @ricohumme did you find a fix for this?

@ricohumme
Copy link
Author

@SamuelLeclerc33 sadly no, I switched the library and am now using Victory charts to my satisfaction

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

No branches or pull requests

2 participants