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