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