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)