对应颜色

This commit is contained in:
lai
2024-01-31 20:25:30 +08:00
parent e552ce89be
commit c3b031231e

View File

@@ -179,14 +179,16 @@ function initPicture() {
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
color: function (colors: any) {
var colorList = [
'#FFAE57',
'#FF7853',
'#EA5151',
'#CC3F57',
'#CC0000',
];
return colorList[colors.dataIndex];
const realName = colors.name.split(':')[0];
var colorList: any = {
Event: '#9bca63',
Warning: '#26c0c0',
Minor: '#27727b',
Major: '#d7504b',
Critical: 'rgba(218,44,54,1)',
};
return colorList[realName];
},
},
},