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

View File

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