diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue
index 8d02d88159..163f82ee86 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue
@@ -149,6 +149,12 @@ const init = () => {
}
}
initTableColumnWidth()
+ if (
+ props.chart.type.includes('-stack') &&
+ state.basicStyleForm.radiusColumnBar === 'topRoundAngle'
+ ) {
+ state.basicStyleForm.radiusColumnBar = 'roundAngle'
+ }
}
const debouncedInit = debounce(init, 500)
watch(
@@ -494,7 +500,12 @@ onMounted(() => {
>
{{ t('chart.rightAngle') }}
{{ t('chart.roundAngle') }}
- {{ t('chart.topRoundAngle') }}
+ {{ t('chart.topRoundAngle') }}
diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/DualBasicStyleSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/DualBasicStyleSelector.vue
index 0fe84931bb..bf8e170d04 100644
--- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/DualBasicStyleSelector.vue
+++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/DualBasicStyleSelector.vue
@@ -128,6 +128,12 @@ const init = () => {
state.customColor = state.basicStyleForm.colors[0]
state.colorIndex = 0
}
+ if (
+ props.chart.type.includes('-stack') &&
+ state.basicStyleForm.radiusColumnBar === 'topRoundAngle'
+ ) {
+ state.basicStyleForm.radiusColumnBar = 'roundAngle'
+ }
}
const configCompat = (basicStyle: ChartBasicStyle) => {
// 悬浮改为图例和缩放按钮
@@ -228,9 +234,13 @@ onMounted(() => {
>
{{ t('chart.rightAngle') }}
{{ t('chart.roundAngle') }}
- {{
- t('chart.topRoundAngle')
- }}
+
+ {{ t('chart.topRoundAngle') }}
diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts
index 248d502e29..4f8ee7462a 100644
--- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts
+++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bar.ts
@@ -84,7 +84,8 @@ export class Bar extends G2PlotChartView {
return
}
const isGroup = 'bar-group' === this.name && chart.xAxisExt?.length > 0
- const isStack = 'bar-group-stack' === this.name && chart.extStack?.length > 0
+ const isStack =
+ ['bar-stack', 'bar-group-stack'].includes(this.name) && chart.extStack?.length > 0
const data = cloneDeep(drawOptions.chart.data?.data)
const initOptions: ColumnOptions = {
...this.baseOptions,
diff --git a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts
index 10acc24be4..65f601469b 100644
--- a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts
+++ b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts
@@ -2405,6 +2405,14 @@ export const configRoundAngle = (chart: Chart, styleName: string, callBack?: (da
const topRadius = [0, 0, ...radius]
const bottomRadius = [...radius, 0, 0]
const finalRadius = [...radius, ...radius]
+ if (chart.type.includes('-stack')) {
+ return {
+ [styleName]: datum => {
+ if (!datum.value) return { radius: [], ...(callBack ? callBack(datum) : {}) }
+ return { radius: finalRadius, ...(callBack ? callBack(datum) : {}) }
+ }
+ }
+ }
const isTopRound = basicStyle.radiusColumnBar === 'topRoundAngle'
// 对称条形图
if (chart.type === 'bidirectional-bar') {