-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing chart instance #3
Comments
Hey @ayozebarrera, Looking into it, thanks for contributions |
Great, I tried to give a ref to the chart but they are stateless components and they doesn't accept ref prop. Just changing components to have state, I could ref them and access chart_instance like this: ...
<Bar ref="myChart" .... />
.... let chart = this.refs.myChart.chart_instance;
chart.update();
//and whatever we need ;) If I'm wrong on anything tell me to know |
Hey @ayozebarrera , do you have time for PR? Otherwise I may fix it by EOD or tomorrow morning./ |
Apologies for delaying this fix, was a pretty though week. On it. |
@gor181 never saw your previous comment. I could try but maybe thursday or friday! |
is this now possible? |
Hey @ayozebarrera @rycastaneda, It should work now. Apologies for the delay. Cheerio, |
Dont worry @gor181 I just updated the npm package and I still have the same problem, components are stateless... I guess is a version issue or something
Edited: Nvm, was my mistake :p |
It is working for me guys. My code is like that:
|
Hi
I tried to access to the chart_instance of ChartComponent but I couldn't... I tried to pass a ref to my component but they are stateless... any advice?
The text was updated successfully, but these errors were encountered: