diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-dual-line.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-dual-line.ts index 6ec32aef36..c1a78ba656 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-dual-line.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-dual-line.ts @@ -288,7 +288,7 @@ export class GroupLineMix extends G2ChartView { }) const rightCat = [] if (!extBubble?.length) { - rightCat.push(yAxisExt[0]?.chartShowName ?? yAxisExt[0]?.name) + yAxisExt?.length && rightCat.push(yAxisExt[0]?.chartShowName ?? yAxisExt[0]?.name) } else { const { rightData } = context rightData.forEach( diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-group.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-group.ts index dc88ee440b..13f3572a37 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-group.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-group.ts @@ -258,7 +258,7 @@ export class GroupLineMix extends G2ChartView { merge(intervalMark, leftColorScale) const rightCat = [] if (!extBubble?.length) { - rightCat.push(yAxisExt[0]?.chartShowName ?? yAxisExt[0]?.name) + yAxisExt?.length && rightCat.push(yAxisExt[0]?.chartShowName ?? yAxisExt[0]?.name) } else { const { rightData } = context rightData.forEach( diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-stack.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-stack.ts index f2a7dfc16c..2664907cef 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-stack.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/mix/mix-stack.ts @@ -257,7 +257,7 @@ export class StackLineMix extends G2ChartView { merge(intervalMark, leftColorScale) const rightCat = [] if (!extBubble?.length) { - rightCat.push(yAxisExt[0]?.chartShowName ?? yAxisExt[0]?.name) + yAxisExt.length && rightCat.push(yAxisExt[0]?.chartShowName ?? yAxisExt[0]?.name) } else { const { rightData } = context rightData.forEach(