-
Notifications
You must be signed in to change notification settings - Fork 80
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
Chart is not rendering after generating apk file and installed on mobile #130
Comments
Hi @Gangeshwar3 , Thank you for the report. EDIT: Closed by accident. It should, of course, remain kept open. Kind regards! |
I get the same issue :/ |
Also having this issue. Anyone find a solution? |
I have @highcharts/highcharts-react-native": "^3.1.7" in my project. Is this the latest? |
@jabusir That's right. It's the latest version of this package. |
i don't know, but currently, it runs fine. |
I tested with App.js in this latest repository and having the same issue. Following #104, I still got this error |
I've been able to get a build running in iOS in Expo, iOS Simulator, and iOS App Store build by adding the following to package.json as a dependency
I think it stems from recent versions of Expo having compatibility issues with the metro-config in the highcharts. This makes it so hcscripts are bundled and used when Still working on trying to get it running for Android |
The fix was simply updating to upgrading to Expo 42.0.0 for me. Working on both iOS and Android |
Thank you for the information! I could solved the problem in the same way! |
Update - after going on vacation, my simple "upgrade to expo 42.0.0" quickfix stopped working so I had to get a little creative. As others have mentioned, the issue lies in the
HighchartsReactNative.js:
stringifiedScripts.json: In order to get the contents of the gist, I used console.dir
below the last call to the call to |
Hello,
i am using highcharts in my project,it worked well in development mode and when it is installed on mobile through apk or publish through expo, the charts are not rendering, i have done all the things adding merto.config.js, editing the method
and also edited this method:
` setLayout = async () => {
const indexHtml = Asset.fromModule(require('../highcharts-layout/index.html'))
as per the comments from github issues nothing worked for me.
my package.json file
{ "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@highcharts/highcharts-react-native": "^3.1.3", "expo": "~40.0.0", "expo-status-bar": "~1.0.3", "react": "16.13.1", "react-dom": "16.13.1", "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz", "react-native-web": "~0.13.12", "react-native-webview": "^11.0.3", "react-select": "^3.2.0" }, "devDependencies": { "@babel/core": "~7.9.0" }, "private": true }
metro.config.js
`const { getDefaultConfig } = require("metro-config");
module.exports = (async () => {
const {
resolver: { sourceExts, assetExts }
} = await getDefaultConfig();
return {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false
}
})
},
resolver: {
sourceExts,
assetExts: [...assetExts, "hcscript"]
}
};
})();`
I have created project using the command:expo init myProject.
build the project by using the command: expo build:android.
any other configuration is required to render the charts after build, any one can help on this.
Thanks.
The text was updated successfully, but these errors were encountered: