Closed wiredgril666 closed 5 years ago
You can save data in component state, then set it into ReactEcharts.
Why you want to use appendData
?
The amount of data is a bit large, it is hundreds of thousands to 1 million, so use appendData, load it in batches, and then dynamically increase it. If you use option, it may be too much rendering, then the page will be stuck.
so save them into state, can do this.
refer: https://git.hust.cc/echarts-for-react/#/echarts/dynamic?_k=0fpo4v
<ReactEcharts ref={(e)=>{this.echarts_react = e}/> , then use this.echarts_react.getInstance().appendData({seriesIndex:'1',data:newData}}, but reported Wrong TypeError: this.echarts_react.getEchartsInstance(...).appendData is not a function. My chart is also a scatter plot of the base version. I don't know why this method is not available, because my data volume is a bit large, there may be a few 100,000 to more than 1 million, so I want to use this function