From ad3dd7f5b014566e3abb67921fcfe7ecc6ce7032 Mon Sep 17 00:00:00 2001 From: ulleo Date: Wed, 26 Jun 2024 16:41:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E6=9F=B1=E7=BA=BF=E7=BB=84=E5=90=88=E5=9B=BE=E7=A9=BA=E5=80=BC?= =?UTF-8?q?=E5=A4=84=E7=90=86=E7=9A=84'=E9=9A=90=E8=97=8F=E7=A9=BA?= =?UTF-8?q?=E5=80=BC'=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/editor-senior/components/FunctionCfg.vue | 5 ++++- .../components/js/panel/charts/others/chart-mix.ts | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/FunctionCfg.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/FunctionCfg.vue index 28c153e383..461431d608 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/FunctionCfg.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/FunctionCfg.vue @@ -54,7 +54,10 @@ const init = () => { } } const showIgnoreOption = computed(() => { - return !equalsAny(props.chart.type, 'table-pivot', 'table-info', 'indicator') + return !( + equalsAny(props.chart.type, 'table-pivot', 'table-info', 'indicator') || + props.chart.type.includes('chart-mix') + ) }) const showEmptyDataFieldCtrl = computed(() => { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/chart-mix.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/chart-mix.ts index 17a90c931f..2dbb481aa3 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/chart-mix.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/chart-mix.ts @@ -273,6 +273,17 @@ export class ColumnLineMix extends G2PlotChartView { return tempOption } + setupDefaultOptions(chart: ChartObj): ChartObj { + const { customAttr, senior } = chart + if ( + senior.functionCfg.emptyDataStrategy == undefined || + senior.functionCfg.emptyDataStrategy === 'ignoreData' + ) { + senior.functionCfg.emptyDataStrategy = 'breakLine' + } + return chart + } + protected configCustomColors(chart: Chart, options: DualAxesOptions): DualAxesOptions { const basicStyle = parseJson(chart.customAttr).basicStyle const color = basicStyle.colors.map(item => hexColorToRGBA(item, basicStyle.alpha))