From 56d26d74554aa18ab84da43ce4288c78150bfb09 Mon Sep 17 00:00:00 2001 From: qianming Date: Wed, 25 Aug 2021 17:51:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=B1=E7=8A=B6=E5=AF=B9=E6=AF=94=E5=9B=BE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/report/bigscreen/designer/tools.js | 16 +++--------- .../widget/bar/widgetBarCompareChart.vue | 25 ++++++++++++++++--- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/report-ui/src/views/report/bigscreen/designer/tools.js b/report-ui/src/views/report/bigscreen/designer/tools.js index e0d06072..823e82ea 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools.js +++ b/report-ui/src/views/report/bigscreen/designer/tools.js @@ -7022,14 +7022,6 @@ const widgetTools = [ placeholder: '', value: '柱状对比图', }, - /*{ - type: 'el-switch', - label: '竖展示', - name: 'verticalShow', - required: false, - placeholder: '', - value: false, - },*/ { type: 'vue-color', label: '背景颜色', @@ -7361,7 +7353,7 @@ const widgetTools = [ }, ], }, - /*{ + { name: '提示语设置', list: [ { @@ -7381,7 +7373,7 @@ const widgetTools = [ }, ], }, - { + /*{ name: '坐标轴边距设置', list: [ { @@ -7414,7 +7406,7 @@ const widgetTools = [ value: 10, }, ], - }, + },*/ { name: '图例操作', list: [ @@ -7488,7 +7480,7 @@ const widgetTools = [ value: 'horizontal' }, ], - },*/ + }, { name: '自定义配色', list: [ diff --git a/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarCompareChart.vue b/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarCompareChart.vue index 8a4fc3de..6be98c15 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarCompareChart.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/bar/widgetBarCompareChart.vue @@ -28,7 +28,7 @@ export default { show: false, left: '4%', top: 60, - bottom: 60, + bottom: 10, containLabel: true, width: '40%' }, @@ -43,7 +43,7 @@ export default { show: false, right: '4%', top: 60, - bottom: 60, + bottom: 10, containLabel: true, width: '40%' }, @@ -275,6 +275,7 @@ export default { editorOptions() { this.setOptionsTitle(); this.setOptionsTop(); + this.setOptionsLegend(); this.setOptionsColor(); this.setOptionsData(); }, @@ -292,7 +293,7 @@ export default { }; this.options.title = title; }, - // 数值设定 or 柱体设置 + // 数值设定、柱体设置 setOptionsTop() { const optionsSetup = this.optionsSetup; const series = this.options.series; @@ -333,7 +334,23 @@ export default { } this.options.series = series; }, - // 颜色修改,圆角修改 + // 图例操作 + setOptionsLegend() { + const optionsSetup = this.optionsSetup; + const legend = this.options.legend; + legend.show = optionsSetup.isShowLegend; + legend.left = optionsSetup.lateralPosition; + legend.top = optionsSetup.longitudinalPosition == "top" ? 0 : "auto"; + legend.bottom = + optionsSetup.longitudinalPosition == "bottom" ? 0 : "auto"; + legend.orient = optionsSetup.layoutFront; + legend.textStyle = { + color: optionsSetup.lengedColor, + fontSize: optionsSetup.lengedFontSize + }; + legend.itemWidth = optionsSetup.lengedWidth; + }, + // 颜色修改、圆角修改 setOptionsColor() { const optionsSetup = this.optionsSetup; const customColor = optionsSetup.customColor;