CN-525 echarts图内文字动态调整大小,问题修复:折线图markline标签未显示完全

This commit is contained in:
hyx
2022-05-11 12:37:16 +08:00
parent d8e79b97f7
commit b3f6b5c7ea
2 changed files with 53 additions and 18 deletions

View File

@@ -668,20 +668,37 @@ export function handleEchartFontSize (option) {
const newSeries = []
const chartType = chartOption.series[0].type
chartOption.series.forEach((series) => {
const seriesNew = {
...series,
label: {
...series.label,
fontSize: echartLabelFontSize
},
markLine: {
...series.markLine,
if (series.markLine) {
const seriesNew = {
...series,
label: {
...series.label,
fontSize: echartLabelFontSize
},
markLine: {
...series.markLine,
label: {
...series.markLine.label,
fontSize: echartLabelFontSize
}
}
}
newSeries.push(seriesNew)
} else {
const seriesNew = {
...series,
label: {
...series.label,
fontSize: echartLabelFontSize
},
markLine: {
label: {
fontSize: echartLabelFontSize
}
}
}
newSeries.push(seriesNew)
}
newSeries.push(seriesNew)
})
if (chartType === 'pie') {