amcharts / amcharts3-react

Official amCharts V3 React component
Apache License 2.0
118 stars 50 forks source link

Calling AmSerialCharts methods on a chart? #60

Open Jaftem opened 7 years ago

Jaftem commented 7 years ago

It seems the only way to do this is to access the chart attribute of the element's state:

this.refs.mychart.state.chart

chart however is null when I try to access in componentDidMount and accessible (not null) in componentWillUpdate (called after componentDidMount and only called once on refresh of the current page - ie., if I click a link to my AmCharts page from another page, this method is never called).

Is there a reliable way to access state data so that I can call AmSerialCharts methods on the AmChart?