From e3775147936e6f58c408abef3e2240b1be9eeda8 Mon Sep 17 00:00:00 2001 From: qianming Date: Thu, 19 Aug 2021 15:41:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A0=86=E5=8F=A0=E5=9B=BE=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/report/bigscreen/designer/tools.js | 16 ++++++++++++++-- .../designer/widget/bar/widgetBarStackChart.vue | 10 ++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/report-ui/src/views/report/bigscreen/designer/tools.js b/report-ui/src/views/report/bigscreen/designer/tools.js index e9aceb81..689400d1 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools.js +++ b/report-ui/src/views/report/bigscreen/designer/tools.js @@ -5717,6 +5717,18 @@ const widgetTools = [ placeholder: '', value: '' }, + { + type: 'el-select', + label: '堆叠样式', + name: 'stackStyle', + required: false, + placeholder: '', + selectOptions: [ + {code: 'leftRight', name: '左右堆叠'}, + {code: 'upDown', name: '上下堆叠'}, + ], + value: 'leftRight' + }, [ { name: '柱体设置', @@ -6090,7 +6102,7 @@ const widgetTools = [ }, ], }, - /*{ + { name: '坐标轴边距设置', list: [ { @@ -6123,7 +6135,7 @@ const widgetTools = [ value: 10, }, ], - },*/ + }, /*{ name: '图例操作', list: [ diff --git a/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue b/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue index 3ee18515..d2f42a85 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarStackChart.vue @@ -301,6 +301,15 @@ export default { }); return newArr; }, + //获取堆叠样式 + getStackStyle(){ + const optionsSetup = this.optionsSetup; + let style = "" + if (optionsSetup.stackStyle == "upDown") { + style = "total" + } + return style + }, //静态数据 staticDataFn(val) { const optionsSetup = this.optionsSetup; @@ -329,6 +338,7 @@ export default { type: "bar", data: data, barGap: "0%", + stack: this.getStackStyle(), barWidth : optionsSetup.maxWidth, label : { show: optionsSetup.isShow,