diff --git a/core/core-frontend/src/models/chart/chart-attr.d.ts b/core/core-frontend/src/models/chart/chart-attr.d.ts
index a9f3d7e56f..d438f5d986 100644
--- a/core/core-frontend/src/models/chart/chart-attr.d.ts
+++ b/core/core-frontend/src/models/chart/chart-attr.d.ts
@@ -860,6 +860,10 @@ declare interface ChartLabelAttr {
* 总计标签格式化设置
*/
totalFormatter: BaseFormatter
+ /**
+ * 柱状图堆叠指标
+ */
+ showStackQuota: boolean
}
/**
* 提示设置
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue
index a019c5976b..0a4f646fec 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue
@@ -432,9 +432,12 @@ watch(
@onChangeMiscStyleForm="onChangeMiscStyleForm"
/>
- onLabelChange({ data: val }, 'show')"
:title="t('chart.label')"
name="label"
>
@@ -446,7 +449,7 @@ watch(
:all-fields="props.allFields"
@onLabelChange="onLabelChange"
/>
-
+
{
if (chart.customAttr) {
const customAttr = chart.customAttr
if (customAttr.label) {
+ configCompat(customAttr.label)
state.labelForm = defaultsDeep(customAttr.label, cloneDeep(COMPUTED_DEFAULT_LABEL.value))
if (chartType.value === 'liquid' && state.labelForm.fontSize < fontSizeList.value[0].value) {
state.labelForm.fontSize = fontSizeList.value[0].value
@@ -253,6 +255,11 @@ const init = () => {
initPosition()
}
}
+const configCompat = (labelAttr: DeepPartial) => {
+ if (labelAttr.showStackQuota === undefined) {
+ labelAttr.showStackQuota = labelAttr.show
+ }
+}
const checkLabelContent = contentProp => {
if (chartType.value === 'funnel') {
return false
@@ -444,15 +451,6 @@ const conversionPrecision = [
-
-
-
无其他可设置的属性
+
+
+
+
+
+
+
+
-
-
-