This commit is contained in:
cwchen 2024-04-23 15:52:40 +08:00
parent 5fb459b9d8
commit fdfd5d0b94
1 changed files with 11 additions and 5 deletions

View File

@ -1323,21 +1323,24 @@ function initResourceRate() {
dataNum: 50,
dataNumColor: 'rgba(251,221,45,0.8)',
dashboardBgc: 'rgba(254,249,209,0.2)',
dashboardColor: 'rgba(251,221,45,0.8)'
dashboardColor: 'rgba(251,221,45,0.8)',
isRate:true
},
{
dataTitle: '设备使用率',
dataNum: 25,
dataNumColor: 'rgba(1,194,255,0.8)',
dashboardBgc: 'rgba(45,153,139,0.2)',
dashboardColor: 'rgba(1,194,255,0.8)'
dashboardColor: 'rgba(1,194,255,0.8)',
isRate:true
},
{
dataTitle: '能源使用率',
dataNum: 15,
dataNumColor: 'rgba(1,255,193,0.8)',
dashboardBgc: 'rgba(45,153,139,0.2)',
dashboardColor: 'rgba(1,255,193,0.8)'
dashboardColor: 'rgba(1,255,193,0.8)',
isRate:false
},
]
loader.get(url, null, function (res) {
@ -1416,8 +1419,11 @@ function getResourceChartOption(config) {
offsetCenter: [0, '-25%'],
valueAnimation: true,
formatter: function (value) {
// return '{value|' + value + '}{unit|%}';
return '{value|' + value + '}';
if(config.isRate){
return '{value|' + value + '}{unit|%}';
}else{
return '{value|' + value + '}';
}
},
rich: {
value: {