You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
929 B

3 years ago
// 雷达图
3 years ago
export default function raydarOption(dName = [], dValue = []) {
3 years ago
let arr = [];
let maxNum = 0;
3 years ago
dValue.forEach(ele => {
3 years ago
if (ele >= maxNum) {
3 years ago
maxNum = ele * 1
}
3 years ago
})
dName.forEach(ele => {
let obj = {
name: ele,
3 years ago
max: maxNum,
3 years ago
};
arr.push(obj)
})
return {
3 years ago
radar: {
3 years ago
indicator: arr
3 years ago
},
tooltip: {
trigger: "item",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
fontSize: 9
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
confine: true
},
series: [{
type: 'radar',
data: [{
value: dValue,
}, ]
}]
3 years ago
}
}