refactor(图表): 标签字体大小统一为12

This commit is contained in:
wisonic 2024-07-22 15:36:12 +08:00
parent 314e65de51
commit 7867d0541d
2 changed files with 2 additions and 7 deletions

View File

@ -177,12 +177,7 @@ const changeLabelAttr = prop => {
const init = () => { const init = () => {
const chart = JSON.parse(JSON.stringify(props.chart)) const chart = JSON.parse(JSON.stringify(props.chart))
if (chart.customAttr) { if (chart.customAttr) {
let customAttr = null const customAttr = chart.customAttr
if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') {
customAttr = JSON.parse(JSON.stringify(chart.customAttr))
} else {
customAttr = JSON.parse(chart.customAttr)
}
if (customAttr.label) { if (customAttr.label) {
state.labelForm = defaultsDeep(customAttr.label, cloneDeep(COMPUTED_DEFAULT_LABEL.value)) state.labelForm = defaultsDeep(customAttr.label, cloneDeep(COMPUTED_DEFAULT_LABEL.value))
if (chartType.value === 'liquid' && state.labelForm.fontSize < fontSizeList.value[0].value) { if (chartType.value === 'liquid' && state.labelForm.fontSize < fontSizeList.value[0].value) {

View File

@ -277,7 +277,7 @@ export const DEFAULT_LABEL: ChartLabelAttr = {
show: false, show: false,
position: 'top', position: 'top',
color: '#909399', color: '#909399',
fontSize: 10, fontSize: 12,
formatter: '', formatter: '',
labelLine: { labelLine: {
show: true show: true