From 52c722720fb5921c41bc7e9f609b8abb0df12732 Mon Sep 17 00:00:00 2001 From: ulleo Date: Mon, 23 Sep 2024 13:43:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=8F=8C=E8=BD=B4=E5=9B=BE=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E6=A0=B7=E5=BC=8F=E5=92=8C=E7=BA=B5=E8=BD=B4?= =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/data-visualization/dvMain.ts | 45 ++++++++++++++++++- .../editor-style/ChartStyleBatchSet.vue | 4 ++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index 20161b8722..f063f34af6 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -731,7 +731,50 @@ export const dvMainStore = defineStore('dataVisualization', { // 修改对应图表的参数 this.curBatchOptComponents.forEach(viewId => { const viewInfo = this.canvasViewInfo[viewId] - if (propertyInfo.subProp) { + //针对双轴图chart-mix + if ( + viewInfo.type.includes('chart-mix') && + propertyInfo.property === 'basicStyle' && + propertyInfo.subProp + ) { + const subValue = get(propertyInfo.value, propertyInfo.subProp) + const target = viewInfo[propertyInfo.custom][propertyInfo.property] + set(target, propertyInfo.subProp, subValue) + switch (propertyInfo.subProp) { + case 'alpha': + const subAlpha = get(propertyInfo.value, 'subAlpha') + set(target, 'subAlpha', subAlpha) + break + case 'colorScheme': + const subColorScheme = get(propertyInfo.value, 'subColorScheme') + set(target, 'subColorScheme', subColorScheme) + break + case 'seriesColor': + const subSeriesColor = get(propertyInfo.value, 'subSeriesColor') + set(target, 'subSeriesColor', subSeriesColor) + break + case 'colors': + const subColors = get(propertyInfo.value, 'subColors') + set(target, 'subColors', subColors) + break + case 'lineWidth': + const leftLineWidth = get(propertyInfo.value, 'leftLineWidth') + set(target, 'leftLineWidth', leftLineWidth) + break + case 'lineSymbol': + const leftLineSymbol = get(propertyInfo.value, 'leftLineSymbol') + set(target, 'leftLineSymbol', leftLineSymbol) + break + case 'lineSymbolSize': + const leftLineSymbolSize = get(propertyInfo.value, 'leftLineSymbolSize') + set(target, 'leftLineSymbolSize', leftLineSymbolSize) + break + case 'lineSmooth': + const leftLineSmooth = get(propertyInfo.value, 'leftLineSmooth') + set(target, 'leftLineSmooth', leftLineSmooth) + break + } + } else if (propertyInfo.subProp) { const subValue = get(propertyInfo.value, propertyInfo.subProp) const target = viewInfo[propertyInfo.custom][propertyInfo.property] set(target, propertyInfo.subProp, subValue) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue index d384b1755e..29a18f7bda 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue @@ -17,6 +17,7 @@ @onTooltipChange="onTooltipChange" @onChangeXAxisForm="onChangeXAxisForm" @onChangeYAxisForm="onChangeYAxisForm" + @onChangeYAxisExtForm="onChangeYAxisExtForm" @onTextChange="onTextChange" @onLegendChange="onLegendChange" @onBackgroundChange="onBackgroundChange" @@ -87,6 +88,9 @@ const onChangeXAxisForm = (val, prop) => { const onChangeYAxisForm = (val, prop) => { batchOptChange('customStyle', 'yAxis', val, prop) } +const onChangeYAxisExtForm = (val, prop) => { + batchOptChange('customStyle', 'yAxisExt', val, prop) +} const onIndicatorChange = (val, prop) => { batchOptChange('customAttr', 'indicator', val.indicatorValue, prop)