From 5cba8506538c7ae0faae34bb9fafa12713abe5e2 Mon Sep 17 00:00:00 2001 From: qianming Date: Mon, 23 Oct 2023 15:46:45 +0800 Subject: [PATCH] =?UTF-8?q?feat--=E6=8A=98=E7=BA=BF=E5=9B=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=AE=BE=E5=AE=9A=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=99=BE=E5=88=86=E6=AF=94=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/configure/lineCharts/widget-line-stack.js | 8 ++++++++ .../tools/configure/lineCharts/widget-linechart.js | 8 ++++++++ .../designer/widget/line/widgetLineStackChart.vue | 2 ++ .../designer/widget/line/widgetLinechart.vue | 2 ++ 4 files changed, 20 insertions(+) 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 0a6b0f28..ee53d268 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 @@ -568,6 +568,14 @@ export const widgetLineStack = { placeholder: '', value: false }, + { + type: 'el-switch', + label: '百分比符号显示', + name: 'percentSign', + required: false, + placeholder: '', + value: false + }, { type: 'el-input-number', 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 2a2e1f04..b3379cfa 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 @@ -560,6 +560,14 @@ export const widgetLinechart = { placeholder: '', value: false }, + { + type: 'el-switch', + label: '百分比符号显示', + name: 'percentSign', + required: false, + placeholder: '', + value: false + }, { type: 'el-input-number', label: '字体字号', 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 206a80da..53ec48c3 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineStackChart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLineStackChart.vue @@ -400,6 +400,7 @@ export default { fontSize: optionsSetup.fontSize, color: optionsSetup.dataColor, fontWeight: optionsSetup.fontWeight, + formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}' }, }); legendName.push(yAxisList[i]); @@ -488,6 +489,7 @@ export default { fontSize: optionsSetup.fontSize, color: optionsSetup.dataColor, fontWeight: optionsSetup.fontWeight, + formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}' }, }); } 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 8e206cd9..e9aee650 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLinechart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/line/widgetLinechart.vue @@ -364,6 +364,7 @@ export default { fontSize: optionsSetup.fontSize, color: optionsSetup.dataColor, fontWeight: optionsSetup.fontWeight, + formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}' }; series[i].data = data; this.options.legend["data"] = legendName; @@ -434,6 +435,7 @@ export default { fontSize: optionsSetup.fontSize, color: optionsSetup.dataColor, fontWeight: optionsSetup.fontWeight, + formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}' }; obj.data = val.series[i].data; series.push(obj);