diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js
index 0be62dda0c..d2c846c212 100644
--- a/frontend/src/lang/en.js
+++ b/frontend/src/lang/en.js
@@ -1509,7 +1509,14 @@ export default {
Line (area) chart, Column (Bar) chart, Dashboard: {a} is series name, {b} is category value, {c} is value
Pie chart, Funnel chart: {a} is series name, {b} is data item name, {c} is value, {d} is percentage
Map : {a} (series name), {b} is area name, {c} is merged values, {d} is none
- Scatter (Bubble) plot: {a} is series name, {b} is data name, {c} is numeric array, {d} is none`
+ Scatter (Bubble) plot: {a} is series name, {b} is data name, {c} is numeric array, {d} is none`,
+ h_position: 'Horizontal Position',
+ v_position: 'Vertical Position',
+ p_left: 'Left',
+ p_right: 'Right',
+ p_top: 'Top',
+ p_bottom: 'Bottom',
+ p_center: 'Center'
},
dataset: {
spend_time: 'Spend',
diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js
index 934ee002fd..53ca7ddf3e 100644
--- a/frontend/src/lang/tw.js
+++ b/frontend/src/lang/tw.js
@@ -1503,7 +1503,14 @@ export default {
折線(區域)圖、柱狀(條形)圖、儀表盤 : {a}(系列名稱),{b}(類目值),{c}(數值)
餅圖、漏鬥圖: {a}(系列名稱),{b}(數據項名稱),{c}(數值), {d}(百分比)
地圖 : {a}(系列名稱),{b}(區域名稱),{c}(合並數值), {d}(無)
- 散點圖(氣泡)圖 : {a}(系列名稱),{b}(數據名稱),{c}(數值數組), {d}(無)`
+ 散點圖(氣泡)圖 : {a}(系列名稱),{b}(數據名稱),{c}(數值數組), {d}(無)`,
+ h_position: '水平位置',
+ v_position: '垂直位置',
+ p_left: '左對齊',
+ p_right: '右對齊',
+ p_top: '上對齊',
+ p_bottom: '下對齊',
+ p_center: '居中'
},
dataset: {
spend_time: '耗時',
diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js
index e82257b21a..d9c5e884d8 100644
--- a/frontend/src/lang/zh.js
+++ b/frontend/src/lang/zh.js
@@ -1502,7 +1502,14 @@ export default {
折线(区域)图、柱状(条形)图、仪表盘 : {a}(系列名称),{b}(类目值),{c}(数值)
饼图、漏斗图: {a}(系列名称),{b}(数据项名称),{c}(数值), {d}(百分比)
地图 : {a}(系列名称),{b}(区域名称),{c}(合并数值), {d}(无)
- 散点图(气泡)图 : {a}(系列名称),{b}(数据名称),{c}(数值数组), {d}(无)`
+ 散点图(气泡)图 : {a}(系列名称),{b}(数据名称),{c}(数值数组), {d}(无)`,
+ h_position: '水平位置',
+ v_position: '垂直位置',
+ p_left: '左对齐',
+ p_right: '右对齐',
+ p_top: '上对齐',
+ p_bottom: '下对齐',
+ p_center: '居中'
},
dataset: {
spend_time: '耗时',
diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js
index a2bf9a20e2..86a5087fc5 100644
--- a/frontend/src/views/chart/chart/chart.js
+++ b/frontend/src/views/chart/chart/chart.js
@@ -127,7 +127,9 @@ export const DEFAULT_SIZE = {
symbolOpacity: 0.7,
symbolStrokeWidth: 2,
showIndex: false,
- indexLabel: '序号'
+ indexLabel: '序号',
+ hPosition: 'center',
+ vPosition: 'center'
}
export const DEFAULT_SUSPENSION = {
show: true
diff --git a/frontend/src/views/chart/chart/util.js b/frontend/src/views/chart/chart/util.js
index cec78c5011..972c25c602 100644
--- a/frontend/src/views/chart/chart/util.js
+++ b/frontend/src/views/chart/chart/util.js
@@ -206,7 +206,9 @@ export const TYPE_CONFIGS = [
'dimensionFontStyle',
'dimensionLetterSpace',
'dimensionFontShadow',
- 'spaceSplit'
+ 'spaceSplit',
+ 'hPosition',
+ 'vPosition'
],
'title-selector-ant-v': [
'show',
@@ -251,7 +253,9 @@ export const TYPE_CONFIGS = [
'dimensionFontStyle',
'dimensionLetterSpace',
'dimensionFontShadow',
- 'spaceSplit'
+ 'spaceSplit',
+ 'hPosition',
+ 'vPosition'
],
'title-selector-ant-v': [
'show',
@@ -1939,7 +1943,9 @@ export const TYPE_CONFIGS = [
'dimensionFontStyle',
'dimensionLetterSpace',
'dimensionFontShadow',
- 'spaceSplit'
+ 'spaceSplit',
+ 'hPosition',
+ 'vPosition'
],
'title-selector': [
'show',
@@ -1984,7 +1990,9 @@ export const TYPE_CONFIGS = [
'dimensionFontStyle',
'dimensionLetterSpace',
'dimensionFontShadow',
- 'spaceSplit'
+ 'spaceSplit',
+ 'hPosition',
+ 'vPosition'
],
'title-selector': [
'show',
diff --git a/frontend/src/views/chart/components/normal/LabelNormal.vue b/frontend/src/views/chart/components/normal/LabelNormal.vue
index 52aab307f2..c874c21a4d 100644
--- a/frontend/src/views/chart/components/normal/LabelNormal.vue
+++ b/frontend/src/views/chart/components/normal/LabelNormal.vue
@@ -189,6 +189,9 @@ export default {
this.label_content_class.letterSpacing = (customAttr.size.quotaLetterSpace ? customAttr.size.quotaLetterSpace : DEFAULT_SIZE.quotaLetterSpace) + 'px'
this.label_content_class.textShadow = customAttr.size.quotaFontShadow ? '2px 2px 4px' : 'none'
+ this.content_class.alignItems = customAttr.size.hPosition ? customAttr.size.hPosition : DEFAULT_SIZE.hPosition
+ this.content_class.justifyContent = customAttr.size.vPosition ? customAttr.size.vPosition : DEFAULT_SIZE.vPosition
+
if (!this.dimensionShow) {
this.label_space.marginTop = '0px'
} else {
diff --git a/frontend/src/views/chart/components/normal/LabelNormalText.vue b/frontend/src/views/chart/components/normal/LabelNormalText.vue
index eb9a6967b4..c31a4dba2b 100644
--- a/frontend/src/views/chart/components/normal/LabelNormalText.vue
+++ b/frontend/src/views/chart/components/normal/LabelNormalText.vue
@@ -216,6 +216,9 @@ export default {
this.label_content_class.letterSpacing = (customAttr.size.quotaLetterSpace ? customAttr.size.quotaLetterSpace : DEFAULT_SIZE.quotaLetterSpace) + 'px'
this.label_content_class.textShadow = customAttr.size.quotaFontShadow ? '2px 2px 4px' : 'none'
+ this.content_class.alignItems = customAttr.size.hPosition ? customAttr.size.hPosition : DEFAULT_SIZE.hPosition
+ this.content_class.justifyContent = customAttr.size.vPosition ? customAttr.size.vPosition : DEFAULT_SIZE.vPosition
+
if (!this.dimensionShow) {
this.label_space.marginTop = '0px'
} else {
diff --git a/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue b/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue
index 810a25c0ea..5a1e9b38b6 100644
--- a/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue
+++ b/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue
@@ -634,6 +634,54 @@
@change="changeBarSizeCase('spaceSplit')"
/>
+
+
+ {{ $t('chart.p_left') }}
+ {{ $t('chart.p_center') }}
+ {{ $t('chart.p_right') }}
+
+
+
+
+ {{ $t('chart.p_top') }}
+ {{ $t('chart.p_center') }}
+ {{ $t('chart.p_bottom') }}
+
+
@@ -1076,6 +1124,9 @@ export default {
this.sizeForm.dimensionFontIsItalic = this.sizeForm.dimensionFontIsItalic ? this.sizeForm.dimensionFontIsItalic : DEFAULT_SIZE.dimensionFontIsItalic
this.sizeForm.dimensionLetterSpace = this.sizeForm.dimensionLetterSpace ? this.sizeForm.dimensionLetterSpace : DEFAULT_SIZE.dimensionLetterSpace
this.sizeForm.dimensionFontShadow = this.sizeForm.dimensionFontShadow ? this.sizeForm.dimensionFontShadow : DEFAULT_SIZE.dimensionFontShadow
+
+ this.sizeForm.hPosition = this.sizeForm.hPosition ? this.sizeForm.hPosition : DEFAULT_SIZE.hPosition
+ this.sizeForm.vPosition = this.sizeForm.vPosition ? this.sizeForm.vPosition : DEFAULT_SIZE.vPosition
}
}
},
diff --git a/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue b/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue
index 4fab822eb7..4bf8dab6bc 100644
--- a/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue
+++ b/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue
@@ -984,6 +984,54 @@
@change="changeBarSizeCase('spaceSplit')"
/>
+
+
+ {{ $t('chart.p_left') }}
+ {{ $t('chart.p_center') }}
+ {{ $t('chart.p_right') }}
+
+
+
+
+ {{ $t('chart.p_top') }}
+ {{ $t('chart.p_center') }}
+ {{ $t('chart.p_bottom') }}
+
+
@@ -1384,6 +1432,9 @@ export default {
this.sizeForm.dimensionFontIsItalic = this.sizeForm.dimensionFontIsItalic ? this.sizeForm.dimensionFontIsItalic : DEFAULT_SIZE.dimensionFontIsItalic
this.sizeForm.dimensionLetterSpace = this.sizeForm.dimensionLetterSpace ? this.sizeForm.dimensionLetterSpace : DEFAULT_SIZE.dimensionLetterSpace
this.sizeForm.dimensionFontShadow = this.sizeForm.dimensionFontShadow ? this.sizeForm.dimensionFontShadow : DEFAULT_SIZE.dimensionFontShadow
+
+ this.sizeForm.hPosition = this.sizeForm.hPosition ? this.sizeForm.hPosition : DEFAULT_SIZE.hPosition
+ this.sizeForm.vPosition = this.sizeForm.vPosition ? this.sizeForm.vPosition : DEFAULT_SIZE.vPosition
}
}
},