Bladeren bron

feat--增加xAxis数值自动换行开关

qianming 1 jaar geleden
bovenliggende
commit
3ab3de1d16

+ 8 - 0
report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-bar-double-yaxis-chart.js

@@ -384,6 +384,14 @@ export const widgetBarDoubleYaxis = {
               placeholder: '',
               value: 14,
             },
+            {
+              type: 'el-switch',
+              label: '数值自动换行',
+              name: 'textRowsBreakAuto',
+              required: false,
+              placeholder: '',
+              value: false,
+            },
             {
               type: 'el-input-text',
               label: '数值行数',

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

@@ -371,6 +371,14 @@ export const widgetBarLineStack = {
               placeholder: '',
               value: 14,
             },
+            {
+              type: 'el-switch',
+              label: '数值自动换行',
+              name: 'textRowsBreakAuto',
+              required: false,
+              placeholder: '',
+              value: false,
+            },
             {
               type: 'el-input-text',
               label: '数值行数',

+ 8 - 0
report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-barlinechart.js

@@ -387,6 +387,14 @@ export const widgetBarlinechart = {
               placeholder: '',
               value: 14,
             },
+            {
+              type: 'el-switch',
+              label: '数值自动换行',
+              name: 'textRowsBreakAuto',
+              required: false,
+              placeholder: '',
+              value: false,
+            },
             {
               type: 'el-input-text',
               label: '数值行数',

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

@@ -391,6 +391,14 @@ export const widgetMoreBarLine = {
               placeholder: '',
               value: 14,
             },
+            {
+              type: 'el-switch',
+              label: '数值自动换行',
+              name: 'textRowsBreakAuto',
+              required: false,
+              placeholder: '',
+              value: false,
+            },
             {
               type: 'el-input-text',
               label: '数值行数',

+ 8 - 0
report-ui/src/views/bigscreenDesigner/designer/tools/configure/lineCharts/widget-line-stack.js

@@ -366,6 +366,14 @@ export const widgetLineStack = {
               placeholder: '',
               value: 14,
             },
+            {
+              type: 'el-switch',
+              label: '数值自动换行',
+              name: 'textRowsBreakAuto',
+              required: false,
+              placeholder: '',
+              value: false,
+            },
             {
               type: 'el-input-text',
               label: '数值行数',

+ 8 - 0
report-ui/src/views/bigscreenDesigner/designer/tools/configure/lineCharts/widget-linechart.js

@@ -358,6 +358,14 @@ export const widgetLinechart = {
               placeholder: '',
               value: 14,
             },
+            {
+              type: 'el-switch',
+              label: '数值自动换行',
+              name: 'textRowsBreakAuto',
+              required: false,
+              placeholder: '',
+              value: false,
+            },
             {
               type: 'el-input-text',
               label: '数值行数',

+ 17 - 2
report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarDoubleYaxisChart.vue

@@ -185,6 +185,17 @@ export default {
         },
         // 轴反转
         inverse: optionsSetup.reversalX,
+        axisLabel: {
+          show: true,
+          interval: optionsSetup.textInterval,
+          // 文字角度
+          rotate: optionsSetup.textAngleX,
+          textStyle: {
+            // 坐标文字颜色
+            color: optionsSetup.colorX,
+            fontSize: optionsSetup.fontSizeX,
+          },
+        },
         axisLine: {
           show: true,
           lineStyle: {
@@ -464,7 +475,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);
     },
@@ -523,7 +536,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);
     },

+ 17 - 2
report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarLineStackChart.vue

@@ -179,6 +179,17 @@ export default {
         },
         // 轴反转
         inverse: optionsSetup.reversalX,
+        axisLabel: {
+          show: true,
+          interval: optionsSetup.textInterval,
+          // 文字角度
+          rotate: optionsSetup.textAngleX,
+          textStyle: {
+            // 坐标文字颜色
+            color: optionsSetup.colorX,
+            fontSize: optionsSetup.fontSizeX,
+          },
+        },
         axisLine: {
           show: true,
           lineStyle: {
@@ -519,7 +530,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.series = series;
       this.options.xAxis.data = xAxisList;
       this.options.yAxis.data = [];
@@ -650,7 +663,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.series = series;
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);

+ 17 - 2
report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue

@@ -186,6 +186,17 @@ export default {
         },
         // 轴反转
         inverse: optionsSetup.reversalX,
+        axisLabel: {
+          show: true,
+          interval: optionsSetup.textInterval,
+          // 文字角度
+          rotate: optionsSetup.textAngleX,
+          textStyle: {
+            // 坐标文字颜色
+            color: optionsSetup.colorX,
+            fontSize: optionsSetup.fontSizeX,
+          },
+        },
         axisLine: {
           show: true,
           lineStyle: {
@@ -493,7 +504,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);
     },
@@ -552,7 +565,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);
     },

+ 17 - 2
report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetMoreBarLineChart.vue

@@ -246,6 +246,17 @@ export default {
         },
         // 轴反转
         inverse: optionsSetup.reversalX,
+        axisLabel: {
+          show: true,
+          interval: optionsSetup.textInterval,
+          // 文字角度
+          rotate: optionsSetup.textAngleX,
+          textStyle: {
+            // 坐标文字颜色
+            color: optionsSetup.colorX,
+            fontSize: optionsSetup.fontSizeX,
+          },
+        },
         axisLine: {
           show: true,
           lineStyle: {
@@ -551,7 +562,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);
     },
@@ -671,7 +684,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.series = series;
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);

+ 17 - 2
report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineStackChart.vue

@@ -144,6 +144,17 @@ export default {
         },
         // 轴反转
         inverse: optionsSetup.reversalX,
+        axisLabel: {
+          show: true,
+          interval: optionsSetup.textInterval,
+          // 文字角度
+          rotate: optionsSetup.textAngleX,
+          textStyle: {
+            // 坐标文字颜色
+            color: optionsSetup.colorX,
+            fontSize: optionsSetup.fontSizeX,
+          },
+        },
         axisLine: {
           show: true,
           lineStyle: {
@@ -428,7 +439,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);
     },
@@ -531,7 +544,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.series = series;
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);

+ 17 - 2
report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLinechart.vue

@@ -158,6 +158,17 @@ export default {
         },
         // 轴反转
         inverse: optionsSetup.reversalX,
+        axisLabel: {
+          show: true,
+          interval: optionsSetup.textInterval,
+          // 文字角度
+          rotate: optionsSetup.textAngleX,
+          textStyle: {
+            // 坐标文字颜色
+            color: optionsSetup.colorX,
+            fontSize: optionsSetup.fontSizeX,
+          },
+        },
         axisLine: {
           show: true,
           lineStyle: {
@@ -380,7 +391,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);
     },
@@ -477,7 +490,9 @@ export default {
           return str
         }
       }
-      this.options.xAxis.axisLabel = axisLabel;
+      if (optionsSetup.textRowsBreakAuto) {
+        this.options.xAxis.axisLabel = axisLabel;
+      }
       this.options.series = series;
       this.options.legend["data"] = legendName;
       this.setOptionsLegendName(legendName);