window.onresize = () => { this.initChart()}改为
window.addEventListener('resize', () => { this.initChart()})