Open appjitsu opened 3 years ago
did the fixes mentioned here: https://github.com/highcharts/highcharts-react-native/issues/104
it works, but it would be nice to use bundled assets and not the cdn
@appjitsu have u have managed to get the chart show in the ios release? if so could you show me spec u have ur package json and in HighchartsReactNative.js. my chart shows in expo but not when the apk has been generated.help would greatly appreciated
Hi @musangowope ,
Have you also tried this one by editing the package files: https://github.com/highcharts/highcharts-react-native/issues/104#issuecomment-714195854 ?
Kind regards!
I got it working for both the emulator and device with:
setLayout = async () => {
this.setState({
layoutHTML: '<html><head><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" /><style>#container{width:100%;height:100%;top:0;left:0;right:0;bottom:0;position:absolute;user-select:none;-webkit-user-select:none}*{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}</style><script>;const hcUtils={</script></head><body><div id="container"></div></body></html>'
})
}
@Denyllon https://github.com/highcharts/highcharts-react-native/issues/104#issuecomment-714195854 actually worked. thanks
@musangowope can we close the ticket?
im having to do this as a hack in addition to the solution in https://github.com/highcharts/highcharts-react-native/issues/104#issuecomment-714195854. if i dont do a setTimeout i still get the error randomly.
setLayout = async () => {
setTimeout(() =>
this.setState({
layoutHTML: '<html><head><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" /><style>#container{width:100%;height:100%;top:0;left:0;right:0;bottom:0;position:absolute;user-select:none;-webkit-user-select:none}*{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}</style><script>;const hcUtils={</script></head><body><div id="container"></div></body></html>',
})
, 150);
};
metro-config.js
package.json