genexu / react-native-pie-chart

Simple pie chart module for your React Native app
MIT License
111 stars 48 forks source link

Invariant Violation: requireNativeComponent: "ARTShape" was not found in the UIManager #48

Open ReeceKenney opened 1 year ago

ReeceKenney commented 1 year ago

While using an expo app (managed workflow), I run into the error while running this code:

<PieChart
    widthAndHeight={250}
    series={[123, 321, 123, 789, 537]}
    sliceColor={['#F44336','#2196F3','#FFEB3B', '#4CAF50', '#FF9800']}
 />

I simply made sure to install the following packages: react, react-native and @react-native-community/art and ran the app. Is there some additional setup that is required? Or is this just incompatible with expo apps?

Versions: "@react-native-community/art": "^1.2.0", "react": "18.1.0", "react-native": "0.70.5",

Thanks in advance!

aidin36 commented 1 year ago

Thanks for the report.

Can you please share the error as well? And any logs that you have? Did you test it on Android or iOS, or both?

punjasin commented 1 year ago

how to fix this hmm i was running ios lasted xcode 14 and react native 0.71 i already install art how do i switch it to svg and someone point me to branch that fix this

aidin36 commented 1 year ago

I already ported the package to react-native-svg. However, I'm waiting for #50 before I publish it.

aidin36 commented 1 year ago

Hi @ReeceKenney , Hi @punjasin ,

I published the v3.0.0 of the package, which now uses react-native-svg. Please read the upgrade guide in the README file. I test it with expo, and it works fine.

Also, I moved the repo under my own account because the package is re-written. Please open an issue there if you encountered any problems. (Also please give it a start if the package is helpful to you! :wink: I lost all the stars.)

New repo: https://github.com/aidin36/react-native-pie-chart