diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js
index 429ffa0efa..3b514a6e3e 100644
--- a/frontend/src/lang/en.js
+++ b/frontend/src/lang/en.js
@@ -1173,7 +1173,16 @@ export default {
conditions_can_not_empty: 'Conditions can not be empty,if unnecessary,please delete the field',
remark: 'Remark',
remark_edit: 'Edit Remark',
- remark_bg_color: 'Background Fill'
+ remark_bg_color: 'Background Fill',
+ quota_font_family: 'Value Font Family',
+ quota_text_style: 'Value Style',
+ quota_letter_space: 'Value Letter Space',
+ dimension_font_family: 'Name Font Family',
+ dimension_text_style: 'Name Style',
+ dimension_letter_space: 'Name Letter Space',
+ font_family: 'Font Family',
+ letter_space: 'Letter Space',
+ font_shadow: 'Font Shadow'
},
dataset: {
parse_filed: 'Parse Field',
diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js
index 82b5fa89e7..7930e9a901 100644
--- a/frontend/src/lang/tw.js
+++ b/frontend/src/lang/tw.js
@@ -1172,7 +1172,16 @@ export default {
conditions_can_not_empty: '字段的條件不能為空,若無條件,請直接刪除該字段',
remark: '備註',
remark_edit: '編輯備註',
- remark_bg_color: '背景填充'
+ remark_bg_color: '背景填充',
+ quota_font_family: '值字體',
+ quota_text_style: '值樣式',
+ quota_letter_space: '值字間距',
+ dimension_font_family: '名稱字體',
+ dimension_text_style: '名稱樣式',
+ dimension_letter_space: '名稱字間距',
+ font_family: '字體',
+ letter_space: '字間距',
+ font_shadow: '字體陰影'
},
dataset: {
parse_filed: '解析字段',
diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js
index 4bc67a27ac..c87094c343 100644
--- a/frontend/src/lang/zh.js
+++ b/frontend/src/lang/zh.js
@@ -1174,7 +1174,16 @@ export default {
conditions_can_not_empty: '字段的条件不能为空,若无条件,请直接删除该字段',
remark: '备注',
remark_edit: '编辑备注',
- remark_bg_color: '背景填充'
+ remark_bg_color: '背景填充',
+ quota_font_family: '值字体',
+ quota_text_style: '值样式',
+ quota_letter_space: '值字间距',
+ dimension_font_family: '名称字体',
+ dimension_text_style: '名称样式',
+ dimension_letter_space: '名称字间距',
+ font_family: '字体',
+ letter_space: '字间距',
+ font_shadow: '字体阴影'
},
dataset: {
parse_filed: '解析字段',
diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js
index afc9abf262..0d0da8969c 100644
--- a/frontend/src/views/chart/chart/chart.js
+++ b/frontend/src/views/chart/chart/chart.js
@@ -61,6 +61,16 @@ export const DEFAULT_SIZE = {
spaceSplit: 10,
dimensionShow: true,
quotaShow: true,
+ quotaFontFamily: 'Microsoft YaHei',
+ quotaFontIsBolder: false,
+ quotaFontIsItalic: false,
+ quotaLetterSpace: 0,
+ quotaFontShadow: false,
+ dimensionFontFamily: 'Microsoft YaHei',
+ dimensionFontIsBolder: false,
+ dimensionFontIsItalic: false,
+ dimensionLetterSpace: 0,
+ dimensionFontShadow: false,
scatterSymbol: 'circle',
scatterSymbolSize: 20,
treemapWidth: 80,
@@ -147,7 +157,10 @@ export const DEFAULT_TITLE_STYLE = {
isBolder: true,
remarkShow: false,
remark: '',
- remarkBackgroundColor: '#ffffffff'
+ remarkBackgroundColor: '#ffffffff',
+ fontFamily: 'Microsoft YaHei',
+ letterSpace: '0',
+ fontShadow: false
}
export const DEFAULT_TITLE_STYLE_DARK = {
@@ -157,7 +170,13 @@ export const DEFAULT_TITLE_STYLE_DARK = {
hPosition: 'left',
vPosition: 'top',
isItalic: false,
- isBolder: true
+ isBolder: true,
+ remarkShow: false,
+ remark: '',
+ remarkBackgroundColor: '#ffffffff',
+ fontFamily: 'Microsoft YaHei',
+ letterSpace: '0',
+ fontShadow: false
}
export const DEFAULT_LEGEND_STYLE = {
@@ -968,3 +987,24 @@ export const BASE_ECHARTS_SELECT = {
shadowBlur: 2
}
}
+
+export const CHART_FONT_FAMILY = [
+ { name: '微软雅黑', value: 'Microsoft YaHei' },
+ { name: '宋体', value: 'SimSun' },
+ { name: '黑体', value: 'SimHei' },
+ { name: '楷体', value: 'KaiTi' }
+]
+
+export const CHART_FONT_LETTER_SPACE = [
+ { name: '0px', value: '0' },
+ { name: '1px', value: '1' },
+ { name: '2px', value: '2' },
+ { name: '3px', value: '3' },
+ { name: '4px', value: '4' },
+ { name: '5px', value: '5' },
+ { name: '6px', value: '6' },
+ { name: '7px', value: '7' },
+ { name: '8px', value: '8' },
+ { name: '9px', value: '9' },
+ { name: '10px', value: '10' }
+]
diff --git a/frontend/src/views/chart/chart/util.js b/frontend/src/views/chart/chart/util.js
index aae1e199ff..9e46dfe09d 100644
--- a/frontend/src/views/chart/chart/util.js
+++ b/frontend/src/views/chart/chart/util.js
@@ -66,7 +66,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -108,7 +111,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -153,7 +159,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -175,8 +184,16 @@ export const TYPE_CONFIGS = [
],
'size-selector-ant-v': [
'quotaFontSize',
+ 'quotaFontFamily',
+ 'quotaFontStyle',
+ 'quotaLetterSpace',
+ 'quotaFontShadow',
'dimensionShow',
'dimensionFontSize',
+ 'dimensionFontFamily',
+ 'dimensionFontStyle',
+ 'dimensionLetterSpace',
+ 'dimensionFontShadow',
'spaceSplit'
],
'title-selector-ant-v': [
@@ -187,7 +204,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -209,8 +229,16 @@ export const TYPE_CONFIGS = [
],
'size-selector-ant-v': [
'quotaFontSize',
+ 'quotaFontFamily',
+ 'quotaFontStyle',
+ 'quotaLetterSpace',
+ 'quotaFontShadow',
'dimensionShow',
'dimensionFontSize',
+ 'dimensionFontFamily',
+ 'dimensionFontStyle',
+ 'dimensionLetterSpace',
+ 'dimensionFontShadow',
'spaceSplit'
],
'title-selector-ant-v': [
@@ -221,7 +249,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -261,7 +292,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -299,7 +333,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -368,7 +405,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -445,7 +485,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -522,7 +565,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -598,7 +644,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -667,7 +716,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -735,7 +787,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -811,7 +866,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -866,7 +924,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -921,7 +982,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -977,7 +1041,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -1030,7 +1097,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -1070,7 +1140,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -1138,7 +1211,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -1188,7 +1264,10 @@ export const TYPE_CONFIGS = [
'hPosition',
'isItalic',
'isBolder',
- 'remarkShow'
+ 'remarkShow',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
],
'legend-selector-ant-v': [
'show',
@@ -1295,8 +1374,16 @@ export const TYPE_CONFIGS = [
],
'size-selector': [
'quotaFontSize',
+ 'quotaFontFamily',
+ 'quotaFontStyle',
+ 'quotaLetterSpace',
+ 'quotaFontShadow',
'dimensionShow',
'dimensionFontSize',
+ 'dimensionFontFamily',
+ 'dimensionFontStyle',
+ 'dimensionLetterSpace',
+ 'dimensionFontShadow',
'spaceSplit'
],
'title-selector': [
@@ -1305,9 +1392,11 @@ export const TYPE_CONFIGS = [
'fontSize',
'color',
'hPosition',
- 'vPosition',
'isItalic',
- 'isBolder'
+ 'isBolder',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
@@ -1329,8 +1418,16 @@ export const TYPE_CONFIGS = [
],
'size-selector': [
'quotaFontSize',
+ 'quotaFontFamily',
+ 'quotaFontStyle',
+ 'quotaLetterSpace',
+ 'quotaFontShadow',
'dimensionShow',
'dimensionFontSize',
+ 'dimensionFontFamily',
+ 'dimensionFontStyle',
+ 'dimensionLetterSpace',
+ 'dimensionFontShadow',
'spaceSplit'
],
'title-selector': [
@@ -1340,7 +1437,10 @@ export const TYPE_CONFIGS = [
'color',
'hPosition',
'isItalic',
- 'isBolder'
+ 'isBolder',
+ 'fontFamily',
+ 'letterSpace',
+ 'fontShadow'
]
}
},
diff --git a/frontend/src/views/chart/components/ChartComponentG2.vue b/frontend/src/views/chart/components/ChartComponentG2.vue
index 447faf672e..7ca0a3b0eb 100644
--- a/frontend/src/views/chart/components/ChartComponentG2.vue
+++ b/frontend/src/views/chart/components/ChartComponentG2.vue
@@ -4,7 +4,7 @@