TradingPal / react-native-highcharts

📈 Add Highcharts charts to react-native app for IOS and Android
https://github.com/TradingPal/react-native-highcharts
256 stars 158 forks source link

No datapoints on first time loading app #43

Open jslok opened 6 years ago

jslok commented 6 years ago

I am finding a weird issue where the first time I install my app on the device and view a chart, the chart shows no datapoints. The legend, title, and axis are all visible but no datapoints are visible. If I close and restart my app, then it works fine. Uninstalling and reinstalling my app will cause the issue to return on the first run until I close and restart the app.

Any ideas what could be the issue?

jslok commented 6 years ago

I found the issue is actually related to my login via react-native-oauth.

If I start the app and allow rn-oauth to open the webview then all highcharts will not show any datapoints. If I skip login, then all highcharts work as expected.

If anybody can shed some light onto why this might be happening or how it can be fixed it would be much appreciated. Thanks!

Infinity0106 commented 6 years ago

is the data asynchronous?, or is static?, you can render a Active indicator while loging in and then when you get the data you render it

jslok commented 6 years ago

The function that fetches the data from highcharts is completely separate from the login. If the user simply opens the login dialog (even if just to cancel the login) no chart will work in any part of my app until restarted. I think something weird is going on that has to do with the webview.