Ecarts data graphics rendering, the amount of graphics data is relatively large. After rendering, click query graphics to render again. There may be a large amount of data. When re rendering, an uncaught error appears: ` setoption ` should not be called during main process
There must be no problem with this error code, because it is displayed normally when loading by default for the first time, but there is a problem when re rendering.
This error is to limit the timing of setoption call, which means that if the setoption or dispatchaction process is not completed, calling setoption again halfway will be limited.
Looking at the relevant information, there is a method of setting setoption delay. It should be feasible, but the time given to me is too long to succeed. We can only find another way out. This reason must be repeated when echarts draws the picture, because the first picture is rendered normally at the beginning of initialization. If it fails to draw another picture after query?Is it possible to erase the previous ecarts diagram and redraw it?
It’s possible theoretically, but it’s also possible in practice. We found a clearing method in echarts. As long as we do a clear before setoption and execute setoption, the code is as follows:
myChart1.clear(); myChart1.setOption(option); through time delay: setTimeout(myCHart1.setOption(option), 500);
- [Solved] Error: `resize` should not be called during main process.
- How to Solve Vue Import Chinese Map & Echarts Import China Error
- [Solved] Vue Import echarts Error: export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘
- [Solved] Vue Import echarts error: Error in mounted hook: “TypeError: Cannot read property ‘init’ of undefined”
- org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body
- [Solved] TypeError: Cannot read property ‘getAttribute’ of undefined
- [Vue warn]: You may have an infinite update loop in a component render function.
- svn: Authorization failed
- [Solved] Echarts 2 & 3 Error: Cannot read property ‘features’ of undefined