wuba / react-native-echarts

📈 React Native ECharts Library: An awesome charting library for React Native, built upon Apache ECharts and leveraging react-native-svg and react-native-skia. Offers significantly better performance compared to WebView-based solutions.
https://wuba.github.io/react-native-echarts/
Apache License 2.0
762 stars 25 forks source link

Not working with expo-router #185

Closed zachTrio closed 4 months ago

zachTrio commented 5 months ago

Describe the bug Graphs will not render when using expo-router. When space is interacted with, throws error: Cannot read property 'handler' of undefined. from dispatchEventsToZRender

To Reproduce

  1. Get the example project within this repo
  2. Follow steps to manually add expo-router here
  3. Delete App.js
  4. Rename src/App.tsx to src/app/index.tsx
  5. Run the project. Screen will be blank.
  6. Tapping on where the graphs would be will throw error.

Expected behavior Graph should behave as intended.

Desktop (please complete the following information):

Smartphone (please complete the following information):

zhiqingchen commented 4 months ago

I tried the reproduce step, and it worked normally.

hareruya-maro commented 4 months ago

I was experiencing the same error, but after upgrading echarts to version ^5.5.1, the error stopped occurring.

zhiqingchen commented 4 months ago

There may be multiple zrender or echarts libraries in your project. Can you check them?

yarn why zrender
DmitryEremenko commented 3 months ago

Hi! Can reproduce on fresh new version of Expo 51 with expo-router installed by default. No chart rendered on ios device but available on web

zhiqingchen commented 3 months ago

Can you provide an example that can be reproduced

DmitryEremenko commented 3 months ago

Can you provide an example that can be reproduced

Just run latest expo application and add basic example from your library. Web - all charts on place mobile - no charts rendered

Everything latest Expo 51, echarts and react-native-echarts, expo-router used as routing solution