diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue index 599226dca5..993b5c3065 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/LabelSelector.vue @@ -177,12 +177,7 @@ const changeLabelAttr = prop => { const init = () => { const chart = JSON.parse(JSON.stringify(props.chart)) if (chart.customAttr) { - let customAttr = null - if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') { - customAttr = JSON.parse(JSON.stringify(chart.customAttr)) - } else { - customAttr = JSON.parse(chart.customAttr) - } + const customAttr = chart.customAttr if (customAttr.label) { state.labelForm = defaultsDeep(customAttr.label, cloneDeep(COMPUTED_DEFAULT_LABEL.value)) if (chartType.value === 'liquid' && state.labelForm.fontSize < fontSizeList.value[0].value) { diff --git a/core/core-frontend/src/views/chart/components/editor/util/chart.ts b/core/core-frontend/src/views/chart/components/editor/util/chart.ts index e8a168dc59..e194499235 100644 --- a/core/core-frontend/src/views/chart/components/editor/util/chart.ts +++ b/core/core-frontend/src/views/chart/components/editor/util/chart.ts @@ -277,7 +277,7 @@ export const DEFAULT_LABEL: ChartLabelAttr = { show: false, position: 'top', color: '#909399', - fontSize: 10, + fontSize: 12, formatter: '', labelLine: { show: true