TradingPal / react-native-highcharts

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

charts not visible ... #113

Open intruder09 opened 4 years ago

intruder09 commented 4 years ago

I have been using this library since almost for 8-9 months ..... and today all os sudden . charts disappeared and doesn't show any error, can you let us know if there is anything new has come up.

Yonatanos commented 4 years ago

Hi finpeg123, I'm sharing the same problem. The cause is that the library uses external scripts, which were updated on 31-10-2019. Hope it will be fixed soon.

The external scripts are being used on index.js and on react-native-highchart.js:

`

                    ${this.props.stock ? '<script src="https://code.highcharts.com/stock/highstock.js"></script>'
                                  : '<script src="https://code.highcharts.com/highcharts.js"></script>'}
                    ${this.props.more ? '<script src="https://code.highcharts.com/highcharts-more.js"></script>'
                                  : ''}
                    ${this.props.guage ? '<script src="https://code.highcharts.com/modules/solid-gauge.js"></script>'
                                  : ''}
                    <script src="https://code.highcharts.com/modules/exporting.js"></script>
                    <script>`
jackcb123 commented 4 years ago

Hi, I have the same issue :/ all graphs in my app just went blank on 31-10-2019 as you said @Yonatanos

Does anyone know if this is a known issue by the developers of those scripts? Is it affecting other highcharts wrappers or just this one? If not, any ideas on who we can contact or are we just supposed to wait...?

tackanoway35 commented 4 years ago

I fixed it by adding version for all external script js Exp: https://code.highcharts.com/7.2.0/modules/exporting.js

intruder09 commented 4 years ago

can you please just paste the code

intruder09 commented 4 years ago

@tackanoway35 thanks man just need to edit src of js in change react-native-highcharts.js

                    ${this.props.stock ? '<script src="https://code.highcharts.com/stock/7.2.0/highstock.js"></script>'
                                  : '<script src="https://code.highcharts.com/7.2.0/highcharts.js"></script>'}
                    ${this.props.more ? '<script src="https://code.highcharts.com/7.2.0/highcharts-more.js"></script>'
                                  : ''}
                    ${this.props.guage ? '<script src=""https://code.highcharts.com/7.2.0/modules/solid-gauge.js"></script>'
                                  : ''}
                    <script src="https://code.highcharts.com/7.2.0/modules/exporting.js"></script>
                    <script>
jigs611989 commented 4 years ago

Hi Guys, I did face the same issue, In my case I didn't pass Options in props so its creating issue, it wasn't creating issue earlier. Just pass options as props like below for quick fix. <ChartView style={{ flex: 1, height: 250 }} config={graphConfigData} javaScriptEnabled domStorageEnabled originWhitelist={['']} options='' />

I have crated Pull Requested by fixing null/undefined option props.

https://github.com/TradingPal/react-native-highcharts/pull/114/files

njt1982 commented 4 years ago

@jigs611989 this solved a mysterious disappearing chart for our React Native on ios app too.