Write ecahrts radar chart

getRadarOption (ARR) { 
the let indiArr = [];
the let dataArr = [];
for ( the let I = 0; I <ARR. length; I ++) {
indiArr. Push ({
name: ARR [ . I] name, // each name pole
min: 0, // minimum range value
max: 100, maximum range value //
});
dataArr. Push (ARR [ I]. value);
}

the let Option = {
Color: [ '# 61a5e8' ],
ToolTip: {
Trigger: 'Item',
Formatter: (the params) => {
the let Indicator = Option. Radar. Indicator;
let nameArr = [];
let data = '';
let result = '';

for (let key in indicator) {
nameArr.push(indicator[key].name);
}

for (let i = 0; i < params.value.length; i++) {
data = nameArr[i] + ':' + (params.value[i]);
result += data + '<br/>';
}

return result;
}
},
grid: {
top: '0%'
},
Radar: {
Shape: 'Circle',
name: {
textStyle: {
Color: '# 000000',
the fontSize: 13 is,
the fontFamily: 'the Microsoft YaHei',
}
},
splitNumber: . 4,
splitArea: {
AreaStyle: {
Color: [ ' #FFFFFF ', ' # f2f2f2 ', ' #FFFFFF ', ' #bcbcbc '] // color radar FIG four divided circle
}
},
axisLine: {// radar chart style line
the lineStyle: {
Show: ' to true ' ,
Color: '#ebebeb',
}
},
SplitLine: // {circle division line style
the lineStyle: {
Show: 'to true',
Color:'#ebebeb'// Color separation line width: . 1, // parting line width } }, RADIUS: '70% ', Center: [ '50%', '50% '], Indicator: indiArr, }, Series: [{ name : 'rule inspection', type: 'Radar', Data: [ { Symbol: 'Circle', AreaStyle: { Normal: { Opacity: 0.6, } }, value: dataArr, each coordinate value // } ] }] }; return Option; },

























Guess you like

Origin www.cnblogs.com/zhanyuefeixian/p/12610955.html
Recommended