diff --git a/core/frontend/src/components/canvas/utils/style.js b/core/frontend/src/components/canvas/utils/style.js index fba57c474f..d47a4120cb 100644 --- a/core/frontend/src/components/canvas/utils/style.js +++ b/core/frontend/src/components/canvas/utils/style.js @@ -120,7 +120,8 @@ export const customAttrTrans = { 'quotaFontSize', 'spaceSplit', // 间隔 'scatterSymbolSize', // 气泡大小,散点图 - 'radarSize'// 雷达占比 + 'radarSize', // 雷达占比 + 'quotaSuffixFontSize' ], 'label': [ 'fontSize' diff --git a/core/frontend/src/views/chart/components/normal/LabelNormal.vue b/core/frontend/src/views/chart/components/normal/LabelNormal.vue index 12c163b56f..2b26bad78b 100644 --- a/core/frontend/src/views/chart/components/normal/LabelNormal.vue +++ b/core/frontend/src/views/chart/components/normal/LabelNormal.vue @@ -187,6 +187,7 @@ export default { this.label_class.fontSize = customAttr.size.dimensionFontSize + 'px' this.label_class.fontFamily = customAttr.size.dimensionFontFamily ? customAttr.size.dimensionFontFamily : DEFAULT_SIZE.dimensionFontFamily + this.label_class.fontFamily = CHART_CONT_FAMILY_MAP[this.label_class.fontFamily] this.label_class.fontWeight = customAttr.size.dimensionFontIsBolder ? 'bold' : 'normal' this.label_class.fontStyle = customAttr.size.dimensionFontIsItalic ? 'italic' : 'normal' this.label_class.letterSpacing = (customAttr.size.dimensionLetterSpace ? customAttr.size.dimensionLetterSpace : DEFAULT_SIZE.dimensionLetterSpace) + 'px' @@ -194,6 +195,7 @@ export default { this.label_content_class.fontSize = customAttr.size.quotaFontSize + 'px' this.label_content_class.fontFamily = customAttr.size.quotaFontFamily ? customAttr.size.quotaFontFamily : DEFAULT_SIZE.quotaFontFamily + this.label_content_class.fontFamily = CHART_CONT_FAMILY_MAP[this.label_content_class.fontFamily] this.label_content_class.fontWeight = customAttr.size.quotaFontIsBolder ? 'bold' : 'normal' this.label_content_class.fontStyle = customAttr.size.quotaFontIsItalic ? 'italic' : 'normal' this.label_content_class.letterSpacing = (customAttr.size.quotaLetterSpace ? customAttr.size.quotaLetterSpace : DEFAULT_SIZE.quotaLetterSpace) + 'px' @@ -205,6 +207,7 @@ export default { if (this.suffix) { this.label_suffix_class.fontSize = (customAttr.size.quotaSuffixFontSize ?? DEFAULT_SIZE.quotaSuffixFontSize) + 'px' this.label_suffix_class.fontFamily = customAttr.size.quotaSuffixFontFamily ? customAttr.size.quotaSuffixFontFamily : DEFAULT_SIZE.quotaSuffixFontFamily + this.label_suffix_class.fontFamily = CHART_CONT_FAMILY_MAP[this.label_suffix_class.fontFamily] this.label_suffix_class.fontWeight = customAttr.size.quotaSuffixFontIsBolder ? 'bold' : 'normal' this.label_suffix_class.fontStyle = customAttr.size.quotaSuffixFontIsItalic ? 'italic' : 'normal' this.label_suffix_class.letterSpacing = (customAttr.size.quotaSuffixLetterSpace ? customAttr.size.quotaSuffixLetterSpace : DEFAULT_SIZE.quotaSuffixLetterSpace) + 'px' diff --git a/core/frontend/src/views/chart/components/normal/LabelNormalText.vue b/core/frontend/src/views/chart/components/normal/LabelNormalText.vue index 21064e0580..ded7de5146 100644 --- a/core/frontend/src/views/chart/components/normal/LabelNormalText.vue +++ b/core/frontend/src/views/chart/components/normal/LabelNormalText.vue @@ -204,6 +204,7 @@ export default { this.label_class.fontSize = customAttr.size.dimensionFontSize + 'px' this.label_class.fontFamily = customAttr.size.dimensionFontFamily ? customAttr.size.dimensionFontFamily : DEFAULT_SIZE.dimensionFontFamily + this.label_class.fontFamily = CHART_CONT_FAMILY_MAP[this.label_class.fontFamily] this.label_class.fontWeight = customAttr.size.dimensionFontIsBolder ? 'bold' : 'normal' this.label_class.fontStyle = customAttr.size.dimensionFontIsItalic ? 'italic' : 'normal' this.label_class.letterSpacing = (customAttr.size.dimensionLetterSpace ? customAttr.size.dimensionLetterSpace : DEFAULT_SIZE.dimensionLetterSpace) + 'px' @@ -211,6 +212,7 @@ export default { this.label_content_class.fontSize = customAttr.size.quotaFontSize + 'px' this.label_content_class.fontFamily = customAttr.size.quotaFontFamily ? customAttr.size.quotaFontFamily : DEFAULT_SIZE.quotaFontFamily + this.label_content_class.fontFamily = CHART_CONT_FAMILY_MAP[this.label_content_class.fontFamily] this.label_content_class.fontWeight = customAttr.size.quotaFontIsBolder ? 'bold' : 'normal' this.label_content_class.fontStyle = customAttr.size.quotaFontIsItalic ? 'italic' : 'normal' this.label_content_class.letterSpacing = (customAttr.size.quotaLetterSpace ? customAttr.size.quotaLetterSpace : DEFAULT_SIZE.quotaLetterSpace) + 'px' diff --git a/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue b/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue index 80683a9cbb..05f4b52841 100644 --- a/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue +++ b/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue @@ -523,34 +523,6 @@ /> - - - - - - - - {{ $t('chart.font_shadow') }} + + + {{ $t('chart.p_left') }} + {{ $t('chart.p_center') }} + {{ $t('chart.p_right') }} + + + + + {{ $t('chart.p_top') }} + {{ $t('chart.p_center') }} + {{ $t('chart.p_bottom') }} + + + + + + + + + + + + + + + + + + {{ $t('chart.italic') }} + {{ $t('chart.bolder') }} + + + + + + + + {{ $t('chart.font_shadow') }} + {{ $t('chart.font_shadow') }} - - - - {{ $t('chart.p_left') }} - {{ $t('chart.p_center') }} - {{ $t('chart.p_right') }} - - - - - {{ $t('chart.p_top') }} - {{ $t('chart.p_center') }} - {{ $t('chart.p_bottom') }} - - @@ -1197,6 +1257,13 @@ export default { this.sizeForm.indexLabel = DEFAULT_SIZE.indexLabel } + this.sizeForm.quotaSuffixFontSize = this.sizeForm.quotaSuffixFontSize ?? DEFAULT_SIZE.quotaSuffixFontSize + this.sizeForm.quotaSuffixFontFamily = this.sizeForm.quotaSuffixFontFamily ? this.sizeForm.quotaSuffixFontFamily : DEFAULT_SIZE.quotaSuffixFontFamily + this.sizeForm.quotaSuffixFontIsBolder = this.sizeForm.quotaSuffixFontIsBolder ? this.sizeForm.quotaSuffixFontIsBolder : DEFAULT_SIZE.quotaSuffixFontIsBolder + this.sizeForm.quotaSuffixFontIsItalic = this.sizeForm.quotaSuffixFontIsItalic ? this.sizeForm.quotaSuffixFontIsItalic : DEFAULT_SIZE.quotaSuffixFontIsItalic + this.sizeForm.quotaSuffixLetterSpace = this.sizeForm.quotaSuffixLetterSpace ? this.sizeForm.quotaSuffixLetterSpace : DEFAULT_SIZE.quotaSuffixLetterSpace + this.sizeForm.quotaSuffixFontShadow = this.sizeForm.quotaSuffixFontShadow ? this.sizeForm.quotaSuffixFontShadow : DEFAULT_SIZE.quotaSuffixFontShadow + this.sizeForm.quotaFontFamily = this.sizeForm.quotaFontFamily ? this.sizeForm.quotaFontFamily : DEFAULT_SIZE.quotaFontFamily this.sizeForm.quotaFontIsBolder = this.sizeForm.quotaFontIsBolder ? this.sizeForm.quotaFontIsBolder : DEFAULT_SIZE.quotaFontIsBolder this.sizeForm.quotaFontIsItalic = this.sizeForm.quotaFontIsItalic ? this.sizeForm.quotaFontIsItalic : DEFAULT_SIZE.quotaFontIsItalic