From 5ec8feaa5482a9ea1be5c036f9484a670c5a3dd6 Mon Sep 17 00:00:00 2001 From: qianming Date: Fri, 27 Oct 2023 09:33:54 +0800 Subject: [PATCH] =?UTF-8?q?feat--=E6=9F=B1=E7=8A=B6=E5=A0=86=E5=8F=A0?= =?UTF-8?q?=E5=9B=BE=E4=BC=98=E5=8C=96-=E5=A2=9E=E5=8A=A0Y=E8=BD=B4?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC=E5=92=8C=E9=98=B4=E5=BD=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configure/barCharts/widget-bar-stack.js | 16 ++++++++++++++++ .../designer/widget/bar/widgetBarStackChart.vue | 13 ++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-bar-stack.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-bar-stack.js index c4461a68..978f5d32 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-bar-stack.js +++ b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-bar-stack.js @@ -411,6 +411,22 @@ export const widgetBarStack = { placeholder: '', value: true, }, + { + type: 'el-input-text', + label: '最大值', + name: 'maxY', + required: false, + placeholder: '', + value: '100', + }, + { + type: 'el-switch', + label: '阴影显示', + name: 'isShowBackground', + require: false, + placeholder: '', + value: true, + }, { type: 'el-input-text', label: '坐标名', diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarStackChart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarStackChart.vue index 590684c1..d43bc7c8 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarStackChart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarStackChart.vue @@ -1,6 +1,6 @@ @@ -173,10 +173,20 @@ export default { }; this.options.xAxis = xAxis; }, + //判断有无yAxis max,无返回null + getOptionsYMax() { + const optionsSetup = this.optionsSetup; + let max = null; + if (optionsSetup.maxY !== "") { + max = optionsSetup.maxY + } + return max + }, // Y轴设置 setOptionsY() { const optionsSetup = this.optionsSetup; const yAxis = { + max: this.getOptionsYMax(), type: "value", scale: optionsSetup.scale, // 均分 @@ -357,6 +367,7 @@ export default { } series.push({ name: yAxisList[i], + showBackground: optionsSetup.isShowBackground, type: "bar", data: data, barGap: "0%",