-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highchart 1.0.2 doesn't rendering in react-native 0.56.0 #83
Comments
use this line: originWhitelist={['']} |
It's working.... |
I can't see the webview or the chartview or the chart at all.. I have used the example given here,I have no idea what I have missed. Any help is appreciated
My dependencies
|
I am experiencing the same issue (even with the originWhitelist={['']} workaround mentioned above). My ChartView appears as white a box with no actual chart rendered inside. React Native 0.0.56 |
In my case, this problem is also happening. Actually I have a data that is updated dynamically and the first time I call the data API I have this same problem, in the second it shows the chart .... |
@nguyennam271 Any idea why adding |
use nodeJS 8.11.3 version. |
I'm on 9.5.0, why does 8.11.3 fix it? |
yes it works for me.and use a device. |
I'm on Node.js 10.6.0. @Pradeep119 Are you sure 8.11.3 will fix it? |
yes @ws7one earlier i had older version and used huwawei device. then upgrading to node.js 8.11.3 and after using samsung device, it works for me. my configurations are, |
After almost a day, I realised that the react-native-highcharts.js thats supposed to render the html with the scripts in the header tag weren't working properly. Hence the scripts weren't running at all and I am not sure how to catch js errors from inside a webview. Hence the screen was empty because there was nothing to show. After a few iterations I realised, that the script tags mentioned inside head tags which import the libraries of jquery and highcharts and so on, weren't really getting rendered, since they were https. I changed that to http and it started working. Now I am not sure if this is a solution for everyone, but this helped me and to be honest this is not a solution. Still need to find out why http and not https, but for now I am taking a break. With recent issues with RN 0.56.0 and this, seems I have been only finding solutions just to get a basic app up and running. If anybody can find a solution for http/https issue that would fix this completely. Also a reply on how to catch errors inside webview would be quite helpful for further issues with webview. |
This worked for me - boom charts are rendering! Thanks! |
This Worked for me as well |
Likely related to #96 - This fixes the |
package.json
{
"name": "SunnyWeather",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.4.1",
"react-native": "0.56.0",
"react-native-highcharts": "^1.0.2"
},
"devDependencies": {
"babel-jest": "23.2.0",
"babel-preset-react-native": "5.0.2",
"jest": "23.3.0",
"react-test-renderer": "16.4.1"
},
"jest": {
"preset": "react-native"
}
}
App.js
/**
*/
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
import ChartView from 'react-native-highcharts';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
type Props = {};
export default class App extends Component {
render() {
var Highcharts='Highcharts';
var conf={
chart: {
type: 'spline',
animation: Highcharts.svg, // don't animate in old IE
marginRight: 10,
events: {
load: function () {
domStorageEnabled={true} style={{height:300}} config={conf} options={options}>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
// alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
// textAlign: 'center',
margin: 10,
},
instructions: {
// textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
Error
Possible Unhandle Promise Rejection (id: 0): Error: Unable to open URL: file///....
The text was updated successfully, but these errors were encountered: