Bläddra i källkod

柱线图调整,去掉图例

qianming 3 år sedan
förälder
incheckning
fe08b9392c

+ 1 - 1
report-ui/src/mixins/queryform.js

@@ -129,7 +129,7 @@ export default {
         return data
       }
     },
-    // 柱状图、折线图、柱图
+    // 柱状图、折线图、柱线
     barOrLineChartFn(chartProperties, data) {
       const ananysicData = {};
       const xAxisList = [];

+ 7 - 6
report-ui/src/views/report/bigscreen/designer/tools/echartsConfigJson/widget-barlinechart.js

@@ -1,5 +1,5 @@
 /*
- * @Descripttion: 线图
+ * @Descripttion: 线图
  * @version:
  * @Author: qianlishi
  * @Date: 2021-08-29 07:26:48
@@ -595,7 +595,7 @@ export const widgetBarlinechart = {
             list: [
               {
                 type: 'el-switch',
-                label: '图例',
+                label: '显示',
                 name: 'isShowLegend',
                 required: false,
                 placeholder: '',
@@ -610,7 +610,7 @@ export const widgetBarlinechart = {
                 value: '#fff',
               },
               {
-                type: 'el-input-text',
+                type: 'el-input-number',
                 label: '字体大小',
                 name: 'lengedFontSize',
                 required: false,
@@ -632,10 +632,11 @@ export const widgetBarlinechart = {
                 required: false,
                 placeholder: '',
                 selectOptions: [
+                  {code: 'center', name: '居中'},
                   {code: 'left', name: '左对齐'},
                   {code: 'right', name: '右对齐'},
                 ],
-                value: ''
+                value: 'center'
               },
               {
                 type: 'el-select',
@@ -647,7 +648,7 @@ export const widgetBarlinechart = {
                   {code: 'top', name: '顶部'},
                   {code: 'bottom', name: '底部'},
                 ],
-                value: ''
+                value: 'top'
               },
               {
                 type: 'el-select',
@@ -659,7 +660,7 @@ export const widgetBarlinechart = {
                   {code: 'vertical', name: '竖排'},
                   {code: 'horizontal', name: '横排'},
                 ],
-                value: ''
+                value: 'horizontal'
               },
             ],
           },

+ 6 - 8
report-ui/src/views/report/bigscreen/designer/widget/widgetBarlinechart.vue

@@ -31,7 +31,6 @@ export default {
           textStyle: {
             color: "#fff"
           },
-          data: ["货运量", "货运总量"]
         },
         xAxis: [
           {
@@ -139,7 +138,7 @@ export default {
       this.setOptionsTooltip();
       this.setOptionsData();
       this.setOptionsMargin();
-      this.setOptionsLegend();
+      //this.setOptionsLegend();
       this.setOptionsColor();
     },
     // 标题修改
@@ -341,23 +340,23 @@ export default {
       };
       this.options.grid = grid;
     },
-    // 图例操作 legend
+/*    // 图例操作 legend
     setOptionsLegend() {
       const optionsCollapse = this.optionsSetup;
       const legend = this.options.legend;
       legend.show = optionsCollapse.isShowLegend;
-      legend.left = optionsCollapse.lateralPosition == "left" ? 0 : "auto";
-      legend.right = optionsCollapse.lateralPosition == "right" ? 0 : "auto";
+      legend.left = optionsCollapse.lateralPosition;
       legend.top = optionsCollapse.longitudinalPosition == "top" ? 0 : "auto";
       legend.bottom =
         optionsCollapse.longitudinalPosition == "bottom" ? 0 : "auto";
       legend.orient = optionsCollapse.layoutFront;
       legend.textStyle = {
         color: optionsCollapse.lengedColor,
-        fontSize: optionsCollapse.fontSize
+        fontSize: optionsCollapse.lengedFontSize
       };
       legend.itemWidth = optionsCollapse.lengedWidth;
-    },
+      console.log(legend);
+    },*/
     // 图例颜色修改
     setOptionsColor() {
       const optionsCollapse = this.optionsSetup;
@@ -373,7 +372,6 @@ export default {
     // 数据处理
     setOptionsData() {
       const optionsData = this.optionsData; // 数据类型 静态 or 动态
-      console.log(optionsData);
       optionsData.dataType == "staticData"
         ? this.staticDataFn(optionsData.staticData)
         : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);