!142 柱状图与柱线图数值设定配置中增加是否显示百分号的开关

Merge pull request !142 from Mr.Z/tmp_1012
Foming 1 year ago committed by Gitee
commit 814e363043
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -544,6 +544,14 @@ export const widgetBarchart = {
placeholder: '', placeholder: '',
value: true value: true
}, },
{
type: 'el-switch',
label: '百分比符号显示',
name: 'percentSign',
required: false,
placeholder: '',
value: false
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '距离', label: '距离',

@ -713,6 +713,14 @@ export const widgetBarlinechart = {
placeholder: '', placeholder: '',
value: false value: false
}, },
{
type: 'el-switch',
label: '百分比符号显示',
name: 'percentSignLine',
required: false,
placeholder: '',
value: false
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '距离', label: '距离',
@ -764,6 +772,14 @@ export const widgetBarlinechart = {
placeholder: '', placeholder: '',
value: false value: false
}, },
{
type: 'el-switch',
label: '百分比符号显示',
name: 'percentSignBar',
required: false,
placeholder: '',
value: false
},
{ {
type: 'el-input-number', type: 'el-input-number',
label: '距离', label: '距离',

@ -371,6 +371,7 @@ export default {
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.dataColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}'
}; };
// //
if (optionsSetup.colorStyle == 'same') { if (optionsSetup.colorStyle == 'same') {
@ -454,6 +455,7 @@ export default {
fontSize: optionsSetup.fontSize, fontSize: optionsSetup.fontSize,
color: optionsSetup.dataColor, color: optionsSetup.dataColor,
fontWeight: optionsSetup.fontWeight, fontWeight: optionsSetup.fontWeight,
formatter: !!optionsSetup.percentSign ? '{c}%' : '{c}'
}; };
// //
if (optionsSetup.colorStyle == 'same') { if (optionsSetup.colorStyle == 'same') {

@ -337,6 +337,7 @@ export default {
fontSize: optionsSetup.fontSizeLine, fontSize: optionsSetup.fontSizeLine,
color: optionsSetup.subTextColorLine, color: optionsSetup.subTextColorLine,
fontWeight: optionsSetup.fontWeightLine, fontWeight: optionsSetup.fontWeightLine,
formatter: !!optionsSetup.percentSignLine ? '{c}%' : '{c}'
}; };
} }
} }
@ -355,6 +356,7 @@ export default {
fontSize: optionsSetup.fontSizeBar, fontSize: optionsSetup.fontSizeBar,
color: optionsSetup.subTextColorBar, color: optionsSetup.subTextColorBar,
fontWeight: optionsSetup.fontWeightBar, fontWeight: optionsSetup.fontWeightBar,
formatter: !!optionsSetup.percentSignBar ? '{c}%' : '{c}'
}; };
series[key].barWidth = optionsSetup.maxWidth; series[key].barWidth = optionsSetup.maxWidth;
series[key].barMinHeight = optionsSetup.minHeight; series[key].barMinHeight = optionsSetup.minHeight;

Loading…
Cancel
Save