Skip to content
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

Not working on real device #4

Closed
capurunep opened this issue Feb 1, 2017 · 20 comments
Closed

Not working on real device #4

capurunep opened this issue Feb 1, 2017 · 20 comments

Comments

@capurunep
Copy link

Hi,
I am evaluating react-native-highcharts. It works fine in emulator however its not working on real device. I tried with Samsung-Android.
Could you please suggest how to make it work on real device..

Best regards,
Puru

@Infinity0106
Copy link
Contributor

we had the same problem we added domStorageEnable={true} on the webview tag, try getting the latest version and try to exportit

@capurunep
Copy link
Author

Hi,
I am using ChartView..will it work on ChartView as well? I tried with this one and still shows html text on mobile device instead of chart. I used domStorageEnable attribute as:

and also set:
exporting: {
enabled: true
}

Thanks,
Puru

@donaldmorton
Copy link
Contributor

any error log ?

@capurunep
Copy link
Author

On Mobile device, only it renders plain HTML text instead of charts. however, no any error displays.

@jonrh
Copy link

jonrh commented Feb 7, 2017

I'm having the same issue on iOS. In my case I was using v0.0.1 (named react-native-chart-view back then) and it worked fine until recently. I have not been able to figure out what changed.

I tried upgrading to react-native-highcharts v0.1.1 but the issue remains. I also tried the latest version in the GitHub repository but to no avail. It works correctly in the simulator and when built for Debug (I'm doing an iOS app). What does not work is when the app is built for Release. I have not been able to find any error logs. If I figure something out I'll update or comment again in this issue.

Update: After trial and error I believe I've isolated the issue (that I'm having at least) to functions being present in the Highcharts configuration object. When I remove the functions the chart works as expected in react-native-chart-view v0.0.1. The functions I had were as follows:

let highchartConfig = {
    // other Highcharts configurationi options    

    tooltip: {
        formatter: function() {
            // I also tried with no success: return "<b>"+ this.y +"%</b>";
            return `<b>${this.y}%</b>`;
        },
    },

    series: [{
        name: "Name of series", // not important
        data: [1, 2, 3, 4, 5], // not important
    },
    events: {
          // Disable the ability to click the series legend below the chart
          legendItemClick: () => { return false; },
    },
}

@salujaharkirat
Copy link

its working fine for me on IOS actually.

@jonrh
Copy link

jonrh commented Feb 11, 2017

@jinxac Does your Highcharts configuration object have any functions?

@salujaharkirat
Copy link

I havent use any functions yet.. just read your comment and see that issue comes while using functions

@donaldmorton
Copy link
Contributor

donaldmorton commented Feb 13, 2017

Hi @jonrh, you can use this technique to debbug webviews on running devices this could give us more information on what's going on http://stackoverflow.com/questions/6508313/javascript-console-log-in-an-ios-uiwebview

@feoktistov-kir
Copy link

This problem actual for me. I added domStorageEnable={true}, but result show html text

@feoktistov-kir
Copy link

I update highcharts and added domStorageEnable={true}. Now application work only in debug release.

@cgcanceran
Copy link

Same issue I've encountered, react-native-highcharts 0.1.1 is working fine in emulator and debug release but not in the signed release.. Is there anyone knows the solution for this?

@jonrh
Copy link

jonrh commented Mar 1, 2017

@Noiwex Thanks for your input. This is indeed what I suspect is the root cause. Could you please create a pull request to handle it better? Or how would you approach solving this issue?

@nkov nkov mentioned this issue Mar 1, 2017
@nkov
Copy link
Contributor

nkov commented Mar 1, 2017

@Noiwex @jonrh You were right, it was this 'parsing' that caused the issue in iOS release mode (at least for me). My attached pr (#9) fixes this issue by parsing it a different way.

@jonrh
Copy link

jonrh commented Mar 1, 2017

Awesome, thanks @nkov! I'll try to get around to testing your implementation as soon as I can, hopefully tomorrow but it may be few days. Thanks again 👏

@d12544
Copy link

d12544 commented Dec 26, 2018

having the same issue for waterfall chart. works fine on emulator but not on physical device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants