CN-525 echarts图内文字动态调整大小,问题修复:折线图markline标签未显示完全
This commit is contained in:
@@ -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') {
|
||||
|
||||
@@ -114,20 +114,38 @@ export default {
|
||||
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: {
|
||||
...series.markLine,
|
||||
label: {
|
||||
fontSize: echartLabelFontSize
|
||||
}
|
||||
}
|
||||
}
|
||||
newSeries.push(seriesNew)
|
||||
}
|
||||
newSeries.push(seriesNew)
|
||||
})
|
||||
|
||||
if (chartType === 'pie') {
|
||||
|
||||
Reference in New Issue
Block a user