I am trying to add an onClick function for my Charts (f.e. BarChart).
How can I access functions from BarChart when using BarChart only as a component?
My current code snippet:
onClickFunction: function (e) {
// let activeBars = (e.type !== 'mouseout') ? this.getBarsAtEvent(e) : [];
},
render: function () {
return (<BarChart ref="charts1" data={data} options={chartOptions} onClick={this.onClickFunction}/>)
}
Obviously "this" in my onclick function is undefined, but there should be a way to access that, shouldn't it?
Hey
I am trying to add an onClick function for my Charts (f.e. BarChart). How can I access functions from BarChart when using BarChart only as a component?
My current code snippet:
Obviously "this" in my onclick function is undefined, but there should be a way to access that, shouldn't it?
Thanks, Vanessa