From 3ab3de1d16e97a0f549d9d996f1c193110fe46e0 Mon Sep 17 00:00:00 2001 From: qianming Date: Mon, 6 Nov 2023 09:53:53 +0800 Subject: [PATCH] =?UTF-8?q?feat--=E5=A2=9E=E5=8A=A0xAxis=E6=95=B0=E5=80=BC?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget-bar-double-yaxis-chart.js | 8 ++++++++ .../barlineCharts/widget-bar-line-stack.js | 8 ++++++++ .../barlineCharts/widget-barlinechart.js | 8 ++++++++ .../barlineCharts/widget-more-bar-line.js | 8 ++++++++ .../configure/lineCharts/widget-line-stack.js | 8 ++++++++ .../configure/lineCharts/widget-linechart.js | 8 ++++++++ .../widget/bar/widgetBarDoubleYaxisChart.vue | 19 +++++++++++++++++-- .../barline/widgetBarLineStackChart.vue | 19 +++++++++++++++++-- .../widget/barline/widgetBarlinechart.vue | 19 +++++++++++++++++-- .../widget/barline/widgetMoreBarLineChart.vue | 19 +++++++++++++++++-- .../widget/line/widgetLineStackChart.vue | 19 +++++++++++++++++-- .../designer/widget/line/widgetLinechart.vue | 19 +++++++++++++++++-- 12 files changed, 150 insertions(+), 12 deletions(-) diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-bar-double-yaxis-chart.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-bar-double-yaxis-chart.js index 22decbbe..cffd2627 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-bar-double-yaxis-chart.js +++ b/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: '数值行数', diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-bar-line-stack.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-bar-line-stack.js index ddd2afd5..863c79b4 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-bar-line-stack.js +++ b/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: '数值行数', diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-barlinechart.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-barlinechart.js index da035d1a..408f9357 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-barlinechart.js +++ b/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: '数值行数', diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-more-bar-line.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-more-bar-line.js index 3ae17960..b8b4f691 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-more-bar-line.js +++ b/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: '数值行数', diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/lineCharts/widget-line-stack.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/lineCharts/widget-line-stack.js index 56c48f83..ac2ad24e 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/lineCharts/widget-line-stack.js +++ b/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: '数值行数', diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/lineCharts/widget-linechart.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/lineCharts/widget-linechart.js index c959ecae..7217eeb4 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/lineCharts/widget-linechart.js +++ b/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: '数值行数', 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 5cd1cdbf..57d1206d 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarDoubleYaxisChart.vue +++ b/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); }, 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 2be6ae11..05d94db9 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarLineStackChart.vue +++ b/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); 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 2bda77c9..2451067c 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue +++ b/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); }, 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 997e8e7a..1d927029 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetMoreBarLineChart.vue +++ b/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); 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 3f0871bf..c5fa92af 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineStackChart.vue +++ b/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); 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 0ad0b264..1e426890 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLinechart.vue +++ b/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);