Преглед на файлове

feat--柱线堆叠图增加柱体堆叠样式

qianming преди 1 година
родител
ревизия
fd871c031b

+ 12 - 0
report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-bar-line-stack.js

@@ -47,6 +47,18 @@ export const widgetBarLineStack = {
               placeholder: '',
               value: 5,
             },
+            {
+              type: 'el-select',
+              label: '堆叠样式',
+              name: 'stackStyle',
+              required: false,
+              placeholder: '',
+              selectOptions: [
+                { code: 'leftRight', name: '左右堆叠' },
+                { code: 'upDown', name: '上下堆叠' },
+              ],
+              value: 'leftRight'
+            },
           ],
         },
         {

+ 11 - 0
report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarLineStackChart.vue

@@ -359,6 +359,15 @@ export default {
         this.options.legend["data"] = arr;
       }
     },
+    //获取堆叠样式
+    getStackStyle() {
+      const optionsSetup = this.optionsSetup;
+      let style = "";
+      if (optionsSetup.stackStyle == "upDown") {
+        style = "total";
+      }
+      return style;
+    },
     // 数据解析
     setOptionsData(e, paramsConfig) {
       const optionsSetup = this.optionsSetup;
@@ -440,6 +449,7 @@ export default {
           type: "bar",
           data: bar,
           barGap: "0%",
+          stack : this.getStackStyle(),
           barWidth: optionsSetup.maxWidth,
           label: {
             show: optionsSetup.isShowBar,
@@ -544,6 +554,7 @@ export default {
           type: "bar",
           data: bar,
           barGap: "0%",
+          stack : this.getStackStyle(),
           barWidth: optionsSetup.maxWidth,
           label: {
             show: optionsSetup.isShowBar,