Why echarts adaptation doesn't work in vue

< div: id= "id" > < / div >
< / template >
< script >
import echarts from "echarts"

export default {
    data () {
        return {
            charts: ""
        }
    },
    props:["id","opinion","opinionData"],
    mounted(){
        this.$nextTick(function() {
            this.drawPie(this.id)
            
        })
        let _this=this;
       window.addEventListener("resize",function () {
             _this.charts.resize();
        })
    },
    methods:{
        drawPie(id){
            this.charts = echarts.init(document.getElementById(id))
           for(var i = 0;i<this.opinionData.length;iPP){//  type:"bar"
                   this.opinionData[i] = {
                                   type :"bar",
                                   data:this.opinionData[i].data,
                                   name:this.opinionData[i].name
                               }
           }
           this.charts.setOption({
                tooltip : {
                    trigger: "axis",
                    axisPointer : {            // 
                        type : "shadow"        // :"line" | "shadow"
                    }
                },
                legend: {
                    data:this.opinion
                },
                grid: {
                    left: "3%",
                    right: "4%",
                    bottom: "3%",
                    containLabel: true
                },
                xAxis : [
                    {
                        type : "category",
                        data : ["","","","","","",""]
                    }
                ],
                yAxis : [
                    {
                        type : "value"
                    }
                ],
                series : this.opinionData
            })
        }
    }
    
}

< / script >
< style scoped >

* {
    margin: 0;
    padding: 0;
    list-style: none;
}

< / style >

Mar.24,2021

width setting 100%, add
this.myChart.setOption (option);
window.onresize = this.myChart.resize; under the icon to

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