reactjs / react-chartjs

common react charting components using chart.js
MIT License
2.93k stars 299 forks source link

How can i bind event to a chart #10

Closed teamrun closed 9 years ago

teamrun commented 9 years ago

in chart.js doc, BarChart prototype-methods, i can bind click event listener to the canvas and get the clicked bar via chart instance's methods. But in react, in this component, i can not access to the chart instance, even i do not know where is the canvas is... so how can i bind event listener and get the bar clicked?

jhudson8 commented 9 years ago

I've released 0.5.0 which has 2 additional methods on all chart components

teamrun commented 9 years ago

Yeah, thanks a lot, this solves my problem~