For a bar chart I have the following click event defined:
plotOptions: {
series: {
It's working now! The problem was the following (as I understand it):
Like this:
In the config object (passed to the chart):
plotOptions: {
series: {
point: {
events: {
click: function() {
window.postMessage( //data you want to send to react native )
}
}
}
}
}
Pass the onMessage method as prop to the ChartView such as you would pass it to a WebView (https://facebook.github.io/react-native/docs/webview#onmessage)
onMessage(m)} options={options}>
Just now you can console.log, setState, or do anything in your react native onMessage function
onMessage = (m) => {
console.log(m.nativeEvent.data)
}
And that's it, now I can click a bar and change the state of my component ;)