Using echarts in vue to obtain data dynamic assignment through ajax

clipboard.png
optionmounted

clipboard.png
when I click the button to get the data in methods, how can I assign a value to data in legend and series? Can only put the option code in the ajax request?

Mar.23,2021

declare option configuration in data
modify

in Axios
Axios.then((res)=>{
    this.option.serise[0] = res.data.data;
    //  init echarts
})

our practice is to write several functions to package the option configuration of several commonly used Echart charts, and then send the data directly into it

.
Menu