Above:

The structure is raster layout and the left chart is set to width adaptive autoFit: True. When the page is first entered, the canvas width exceeds the width of the parent element. If you change the browser size, the autoFit:true property will be triggered when window.resize is triggered, the screen width will be adjusted, and the chart size will be normal.

In the Mounted periodic function, add the following code to initialize the chart before setting setTimeout

 mounted() {
      const init = document.createEvent('Event')
      init.initEvent('resize'.true.true)
      window.dispatchEvent(init)
      setTimeout(() = >{
        this.chart();
      },10)},Copy the code

It is normal that this is a chart.