Skip to content

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

@devonkoch

Description

@devonkoch
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions