The echarts click event is used in vue, how to assign the value to the vue variable

problem description

the pie chart has been drawn. To add a click event to the pie chart, you need to get the index, assigned to the this.index, but the print is still empty. It seems that in the click event, there is no way to read this.areaEnergy,

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

  let myEnergypis = this.$echarts.init(document.getElementById("energyPis"))
            myEnergypis.setOption({
                    title : {
                    text: "",
                    subtext: ":"+this.areaEnergy.maxNum,
                    x:"center"
                },
                tooltip : {
                    trigger: "item",
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                legend: {
                    orient: "vertical",
                    left: "left",
                    data: this.energyPiename
                },
                series : [
                    {
                        name: "",
                        type: "pie",
                        selectedMode: "single",
                        radius : "55%",
                        center: ["50%", "60%"],
                        data:this.energyPieData,
                        itemStyle: {
                            emphasis: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: "rgba(0, 0, 0, 0.5)"
                            }
                        }
                    }
                ]

            },true);
            myEnergypis.off("click")
            myEnergypis.on("click", function (params) {
               var a = params.dataIndex
               var energyAreaId = params.data.id
               var url = params.data.url
               console.log(url)
               this.areaEnergyindex = a
 
            });

what result do you expect? What is the error message actually seen?

is there a way to assign values back?

Aug.09,2021

this point to the problem

myEnergypis.on('click', (params) => {
   var a = params.dataIndex
   var energyAreaId = params.data.id
   var url = params.data.url
   console.log(url)
   this.areaEnergyindex = a
})
The direction of

this has changed, using the arrow function or caching this

with a variable
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-1b38cba-2b8bc.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-1b38cba-2b8bc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?