From 3a115f3d9b53b1d3eb8a934018c5e267b92b9297 Mon Sep 17 00:00:00 2001 From: qianming Date: Thu, 2 Nov 2023 13:24:53 +0800 Subject: [PATCH] =?UTF-8?q?feat--X=E8=BD=B4=E6=95=B0=E5=80=BC=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=95=B0=E5=80=BC=E8=A1=8C=E6=95=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/widget/bar/widgetBarDoubleYaxisChart.vue | 5 +---- .../designer/widget/bar/widgetBarStackChart.vue | 5 +---- .../designer/widget/bar/widgetBarchart.vue | 7 ++----- .../designer/widget/bar/widgetGradientColorBarchart.vue | 5 +---- .../designer/widget/barline/widgetBarLineStackChart.vue | 5 +---- .../designer/widget/barline/widgetBarlinechart.vue | 5 +---- .../designer/widget/barline/widgetMoreBarLineChart.vue | 5 +---- .../designer/widget/line/widgetLineStackChart.vue | 5 +---- .../designer/widget/line/widgetLinechart.vue | 5 +---- 9 files changed, 10 insertions(+), 37 deletions(-) diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarDoubleYaxisChart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarDoubleYaxisChart.vue index 74248d29..5cd1cdbf 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarDoubleYaxisChart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarDoubleYaxisChart.vue @@ -500,10 +500,7 @@ export default { } } // 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字 - let xAxisDataLength = 1; - if (val.length !== 0) { - xAxisDataLength = val.xAxis.length; - } + const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1; const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const axisLabel = { show: true, diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarStackChart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarStackChart.vue index 61f74a0a..7407a4cf 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarStackChart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarStackChart.vue @@ -500,10 +500,7 @@ export default { legendName.push(val.series[i].name); } // 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字 - let xAxisDataLength = 1; - if (val.length !== 0) { - xAxisDataLength = val.xAxis.length; - } + const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1; const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const axisLabel = { show: true, diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue index eb5c2047..bf658374 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue @@ -515,11 +515,8 @@ export default { } } // 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字 - let xAxisDataLength = 1; - if (val.length !== 0){ - xAxisDataLength = val.xAxis.length; - } - const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX) + const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1; + const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const axisLabel = { show: true, interval: optionsSetup.textInterval, diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetGradientColorBarchart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetGradientColorBarchart.vue index ab6dbb38..54eb6897 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetGradientColorBarchart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetGradientColorBarchart.vue @@ -508,10 +508,7 @@ export default { series[0].data = val.series[0].data; } // 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字 - let xAxisDataLength = 1; - if (val.length !== 0) { - xAxisDataLength = val.xAxis.length; - } + const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1; const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const axisLabel = { show: true, diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarLineStackChart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarLineStackChart.vue index f1f73e05..717cc124 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarLineStackChart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarLineStackChart.vue @@ -624,10 +624,7 @@ export default { }); } // 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字 - let xAxisDataLength = 1; - if (val.length !== 0){ - xAxisDataLength = val.xAxis.length; - } + const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1; const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const axisLabel = { show: true, diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue index 77488a30..2bda77c9 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue @@ -529,10 +529,7 @@ export default { } const optionsSetup = this.optionsSetup; // 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字 - let xAxisDataLength = 1; - if (val.length !== 0) { - xAxisDataLength = val.xAxis.length; - } + const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1; const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const axisLabel = { show: true, diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetMoreBarLineChart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetMoreBarLineChart.vue index fd6d662a..997e8e7a 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetMoreBarLineChart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetMoreBarLineChart.vue @@ -648,10 +648,7 @@ export default { } } // 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字 - let xAxisDataLength = 1; - if (val.length !== 0) { - xAxisDataLength = val.xAxis.length; - } + const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1; const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const axisLabel = { show: true, diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineStackChart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineStackChart.vue index c2252836..3f0871bf 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineStackChart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineStackChart.vue @@ -508,10 +508,7 @@ export default { legendName.push(val.series[i].name); } // 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字 - let xAxisDataLength = 1; - if (val.length !== 0) { - xAxisDataLength = val.xAxis.length; - } + const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1; const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const axisLabel = { show: true, diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLinechart.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLinechart.vue index 3a73613b..0ad0b264 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLinechart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLinechart.vue @@ -454,10 +454,7 @@ export default { } } // 根据图表的宽度 x轴的字体大小、长度来估算X轴的label能展示多少个字 - let xAxisDataLength = 1; - if (val.length !== 0) { - xAxisDataLength = val.xAxis.length; - } + const xAxisDataLength = val.length !== 0 ? val.xAxis.length : 1; const rowsNum = optionsSetup.textRowsNum !== "" ? optionsSetup.textRowsNum : parseInt((this.optionsStyle.width / xAxisDataLength) / optionsSetup.fontSizeX); const axisLabel = { show: true,