plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: () => {
alert("Clicked!");
}
}
}
}
}
有任何想法吗?
谢谢!
它现在正在工作!问题是以下(据我所知):
像这样:
plotOptions: {
series: {
point: {
events: {
click: function() {
window.postMessage( //data you want to send to react native )
}
}
}
}
}
<ChartView style={{ height: 300 }} config={conf} onMessage={m => onMessage(m)} options={options}></ChartView>
onMessage = (m) => {
console.log(m.nativeEvent.data)
}
就是这样,现在我可以单击一个栏并更改我的组件的状态;)