CN-525 错误恢复:Y轴数据格式化恢复

This commit is contained in:
hyx
2022-05-06 16:13:27 +08:00
parent 7b40930c5e
commit 5d19d580d2
2 changed files with 62 additions and 60 deletions

View File

@@ -665,7 +665,6 @@ export function handleEchartFontSize (option) {
const echartLegendFontSize = localStorage.getItem(storageKey.echartLegendFontSize)
const echartLabelFontSize = localStorage.getItem(storageKey.echartLabelFontSize)
let chartOption = option
try {
const newSeries = []
const chartType = chartOption.series[0].type
chartOption.series.forEach((series) => {
@@ -691,6 +690,7 @@ export function handleEchartFontSize (option) {
legend: {
...chartOption.legend,
textStyle: {
...chartOption.legend.textStyle,
fontSize: echartLegendFontSize
}
},
@@ -706,18 +706,21 @@ export function handleEchartFontSize (option) {
legend: {
...chartOption.legend,
textStyle: {
...chartOption.legend.textStyle,
fontSize: echartLegendFontSize
}
},
xAxis: {
...chartOption.xAxis,
axisLabel: {
...chartOption.xAxis.axisLabel,
fontSize: echartLabelFontSize
}
},
yAxis: {
...chartOption.yAxis,
axisLabel: {
...chartOption.yAxis.axisLabel,
fontSize: echartLabelFontSize
}
},
@@ -728,9 +731,6 @@ export function handleEchartFontSize (option) {
series: newSeries
}
}
} catch (e) {
console.error(e)
}
return chartOption
}

View File

@@ -145,12 +145,14 @@ export default {
xAxis: {
...chartOption.xAxis,
axisLabel: {
...chartOption.xAxis.axisLabel,
fontSize: echartLabelFontSize
}
},
yAxis: {
...chartOption.yAxis,
axisLabel: {
...chartOption.yAxis.axisLabel,
fontSize: echartLabelFontSize
}
},