From 3e164dfa791cd67ed03ecd16c7ddb5650a05c6b4 Mon Sep 17 00:00:00 2001 From: ulleo Date: Fri, 29 Dec 2023 15:00:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=95=A3=E7=82=B9=E5=9B=BE=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=BE=85=E5=8A=A9=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/views/chart/chart/common/common.js | 2 +- core/frontend/src/views/chart/chart/common/common_antv.js | 2 +- core/frontend/src/views/chart/view/ChartEdit.vue | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/frontend/src/views/chart/chart/common/common.js b/core/frontend/src/views/chart/chart/common/common.js index cf72c62397..17c37cd9fc 100644 --- a/core/frontend/src/views/chart/chart/common/common.js +++ b/core/frontend/src/views/chart/chart/common/common.js @@ -267,7 +267,7 @@ const hexToRgba = (hex, opacity) => { } export function seniorCfg(chart_option, chart) { - if (chart.senior && chart.type && (chart.type.includes('bar') || chart.type.includes('line') || chart.type.includes('mix'))) { + if (chart.senior && chart.type && (chart.type.includes('bar') || chart.type.includes('line') || chart.type.includes('mix') || chart.type.includes('scatter'))) { const senior = JSON.parse(chart.senior) if (senior.functionCfg) { if (senior.functionCfg.sliderShow) { diff --git a/core/frontend/src/views/chart/chart/common/common_antv.js b/core/frontend/src/views/chart/chart/common/common_antv.js index b112f96a25..556202b749 100644 --- a/core/frontend/src/views/chart/chart/common/common_antv.js +++ b/core/frontend/src/views/chart/chart/common/common_antv.js @@ -1043,7 +1043,7 @@ export function getSlider(chart) { export function getAnalyse(chart) { let senior = {} const assistLine = [] - if (chart.senior && chart.type && (chart.type.includes('bar') || chart.type.includes('line') || chart.type.includes('mix') || chart.type.includes('area'))) { + if (chart.senior && chart.type && (chart.type.includes('bar') || chart.type.includes('line') || chart.type.includes('mix') || chart.type.includes('area') || chart.type.includes('scatter'))) { senior = JSON.parse(chart.senior) if (senior.assistLine && senior.assistLine.length > 0) { const customStyle = JSON.parse(chart.customStyle) diff --git a/core/frontend/src/views/chart/view/ChartEdit.vue b/core/frontend/src/views/chart/view/ChartEdit.vue index 62c546f8e8..8165abb0d2 100644 --- a/core/frontend/src/views/chart/view/ChartEdit.vue +++ b/core/frontend/src/views/chart/view/ChartEdit.vue @@ -2106,7 +2106,8 @@ export default { }, showCfg() { return includesAny(this.view.type, 'bar', 'line', 'area', 'gauge', 'table', 'liquid') && this.view.type !== 'race-bar' || - equalsAny(this.view.type, 'text', 'label', 'map', 'buddle-map') || this.view.render === 'echarts' && includesAny(this.view.type, 'mix') + equalsAny(this.view.type, 'text', 'label', 'map', 'buddle-map') || this.view.render === 'echarts' && includesAny(this.view.type, 'mix') || + this.view.type === 'scatter' }, showSeniorCfg() { return includesAny(this.view.type, 'bar', 'line', 'area', 'table') || @@ -2125,10 +2126,11 @@ export default { } return includesAny(this.view.type, 'bar', 'line', 'area', 'gauge', 'liquid') || equalsAny(this.view.type, 'text', 'label') || - (this.view.render === 'antv' && this.view.type.includes('table')) || this.view.render === 'echarts' && includesAny(this.view.type, 'mix') + (this.view.render === 'antv' && this.view.type.includes('table')) || this.view.render === 'echarts' && includesAny(this.view.type, 'mix') || + this.view.type === 'scatter' }, showAssistLineCfg() { - return includesAny(this.view.type, 'bar', 'line', 'area', 'mix') + return includesAny(this.view.type, 'bar', 'line', 'area', 'mix') || this.view.type === 'scatter' }, showThresholdCfg() { if (this.view.type === 'bidirectional-bar') {