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

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bede79-46bf8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bede79-46bf8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?