|
|
@@ -49,7 +49,8 @@ const chartOption = computed(() => {
|
|
|
color: props.series.map((item) => item.color).filter(Boolean),
|
|
|
tooltip: {trigger: 'axis'},
|
|
|
legend,
|
|
|
- grid: {left: 42, right: 24, top: props.legendWidth ? 58 : 46, bottom: 52},
|
|
|
+ // containLabel 让 grid 自动容纳 Y 轴刻度文字,避免长数值被容器左缘裁切
|
|
|
+ grid: {left: 8, right: 24, top: props.legendWidth ? 58 : 46, bottom: 52, containLabel: true},
|
|
|
xAxis: {type: 'category', boundaryGap: false, data: props.xAxis},
|
|
|
yAxis: {type: 'value', name: props.yAxisName, splitLine: {lineStyle: {color: '#e6eef8'}}},
|
|
|
dataZoom: [
|