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

plotOptions.series.point.events (event) param doesn't work in production #137

Open
devonkoch opened this issue Dec 17, 2021 · 0 comments
Open

Comments

@devonkoch
Copy link

devonkoch commented Dec 17, 2021

plotOptions: {
    series: {
        point: {
            events: {
                click: function (event) {
                    // do stuff with event
                }
            }
        }
    }
}

This doesn't work in production mode, but it works in dev mode. for some reason using --no-dev --minify it doesn't work.

feature specific workaround:

plotOptions: {
    series: {
        point: {
            events: {
                click: function (event) {
                    var x = this.x;
                    var eventObj = {
                        "event": "series click",
                        "xIndex": x,
                    }
                    var eventObjStr = JSON.stringify(eventObj);
                    window.ReactNativeWebView.postMessage(eventObjStr)
                }
            }
        }
    }
}

use this, and access the data on the series and category outside of the react-native-webview in a standard react-native component off the state

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

1 participant