diff --git a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-barchart.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-barchart.js index f8f0b9fd..87435a35 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-barchart.js +++ b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barCharts/widget-barchart.js @@ -544,6 +544,14 @@ export const widgetBarchart = { placeholder: '', value: true }, + { + 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/barlineCharts/widget-barlinechart.js b/report-ui/src/views/bigscreenDesigner/designer/tools/configure/barlineCharts/widget-barlinechart.js index 8bef3bbe..3f4185fb 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 @@ -713,6 +713,14 @@ export const widgetBarlinechart = { placeholder: '', value: false }, + { + type: 'el-switch', + label: '百分比符号显示', + name: 'percentSignLine', + required: false, + placeholder: '', + value: false + }, { type: 'el-input-number', label: '距离', @@ -764,6 +772,14 @@ export const widgetBarlinechart = { placeholder: '', value: false }, + { + type: 'el-switch', + label: '百分比符号显示', + name: 'percentSignBar', + required: false, + placeholder: '', + value: false + }, { type: 'el-input-number', label: '距离', 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 4501758a..1341a049 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue @@ -371,6 +371,7 @@ export default { fontSize: optionsSetup.fontSize, color: optionsSetup.dataColor, fontWeight: optionsSetup.fontWeight, + formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}' }; // 获取颜色样式 if (optionsSetup.colorStyle == 'same') { @@ -454,6 +455,7 @@ export default { fontSize: optionsSetup.fontSize, color: optionsSetup.dataColor, fontWeight: optionsSetup.fontWeight, + formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}' }; // 获取颜色样式 if (optionsSetup.colorStyle == 'same') { 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 47e463aa..12859cf3 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue @@ -337,6 +337,7 @@ export default { fontSize: optionsSetup.fontSizeLine, color: optionsSetup.subTextColorLine, fontWeight: optionsSetup.fontWeightLine, + formatter: !!optionsSetup.percentSignLine ? '{c}%' : '{c}' }; } } @@ -355,6 +356,7 @@ export default { fontSize: optionsSetup.fontSizeBar, color: optionsSetup.subTextColorBar, fontWeight: optionsSetup.fontWeightBar, + formatter: !!optionsSetup.percentSignBar ? '{c}%' : '{c}' }; series[key].barWidth = optionsSetup.maxWidth; series[key].barMinHeight = optionsSetup.minHeight;