I'm able to create a chart with an arbitrary number of graphs no problem, but if I try to go back and change the graphs after the chart has been created I'm getting errors. Is there a proper way to add or remove graphs with the React component? I see that there is an addGraph method in vanilla AmCharts, but I don't know how to access it through the component. Right now I'm just updating the graphs prop on the AmCharts component, but when I do that it gives me an error:
Uncaught TypeError: Cannot read property 'values' of undefined
at Object.stackGraphs (application-140b667….js:77674)
at Object.updateData (application-140b667….js:77656)
at Object.draw (application-140b667….js:77658)
at Object.zoom (application-140b667….js:77636)
at b.zoomAxesAndGraphs (application-140b667….js:172445)
at b.zoomAxesAndGraphs (application-140b667….js:172461)
at b.timeZoom (application-140b667….js:172458)
at b.zoom (application-140b667….js:172457)
at b.drawChart (application-140b667….js:172454)
at b.onDataUpdated (application-140b667….js:172449)
at b.initChart (application-140b667….js:172449)
at b.afterWrite (application-140b667….js:77711)
at b.write (application-140b667….js:77707)
at b.validateNow (application-140b667….js:77734)
at Object.componentDidUpdate (eval at <anonymous> (application-140b667….js:12325), <anonymous>:264:26)
at measureLifeCyclePerf (eval at <anonymous> (application-140b667….js:2965), <anonymous>:75:12)
I'm able to create a chart with an arbitrary number of graphs no problem, but if I try to go back and change the graphs after the chart has been created I'm getting errors. Is there a proper way to add or remove graphs with the React component? I see that there is an
addGraph
method in vanilla AmCharts, but I don't know how to access it through the component. Right now I'm just updating thegraphs
prop on theAmCharts
component, but when I do that it gives me an error: