Echarts Learning Record

Echarts redrawing problem

chart.setoption({}, true)

When modifying the value of setOption, if the data level we return asynchronously is relatively deep, echarts needs to be redrawn, otherwise it will not be displayed as desired. It mainly reflects that you can increase the data, but reduce the data, and find that the display effect of the most data is still maintained on the view. I am very puzzled. It is obvious that the data can be modified by moving. Why increase the map and reduce it? It seems that nothing is done.

Solution: The second parameter of setOption (notMerge)
myChart.setOption({...},true)

  1. If the List item
    is set to true, it is notMerge, if
    it is not merged to false, it is Merge, and the previous things are still preserved~

Official document: chart.setOption(option, notMerge, lazyUpdate);
notMerge
is optional, whether to merge with the previously set option, the default is false, that is, merge.

Guess you like

Origin blog.csdn.net/qq_37291367/article/details/119384589