咱就说这样的左右间距丑不丑。。
经过调整后,嗯,好看了很多。页面也协调多了!
直接上代码:添加以下配置数据:
grid: {x: 50,y: 25,x2: 30,y2: 35
},
this.chart.setOption({width: '100%',xAxis: {show: false,type: 'category',axisLine: {lineStyle: {type: 'dashed',color: 'red'}},data: xData},yAxis: {type: 'value',splitNumber: splitNumber,min: yMin,max: yMax,interval: interval},series: [{data: yData,type: 'line'}],grid: {x: 50,y: 25,x2: 30,y2: 35},})