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,