图表之雷达图
最新修改于 2024-03-13 11:52
## 基础雷达图
```echarts
{
"title": {
"text": "Basic Radar Chart"
},
"legend": {
"data": ["Allocated Budget", "Actual Spending"]
},
"radar": {
"indicator": [{
"name": "Sales",
"max": 6500
}, {
"name": "Administration",
"max": 16000
}, {
"name": "Information Technology",
"max": 30000
}, {
"name": "Customer Support",
"max": 38000
}, {
"name": "Development",
"max": 52000
}, {
"name": "Marketing",
"max": 25000
}]
},
"series": [{
"name": "Budget vs spending",
"type": "radar",
"data": [{
"value": [4200, 3000, 20000, 35000, 50000, 18000],
"name": "Allocated Budget"
}, {
"value": [5000, 14000, 28000, 26000, 42000, 21000],
"name": "Actual Spending"
}]
}]
}
```
## 多雷达图
```echarts
{
"title": {
"text": "Multiple Radar"
},
"tooltip": {
"trigger": "axis"
},
"legend": {
"left": "center",
"data": ["A Software", "A Phone", "Another Phone", "Precipitation", "Evaporation"]
},
"radar": [{
"indicator": [{
"text": "Brand",
"max": 100
}, {
"text": "Content",
"max": 100
}, {
"text": "Usability",
"max": 100
}, {
"text": "Function",
"max": 100
}],
"center": ["25%", "40%"],
"radius": 80
}, {
"indicator": [{
"text": "Look",
"max": 100
}, {
"text": "Photo",
"max": 100
}, {
"text": "System",
"max": 100
}, {
"text": "Performance",
"max": 100
}, {
"text": "Screen",
"max": 100
}],
"radius": 80,
"center": ["50%", "60%"]
}, {
"indicator": [{
"text": "1月",
"max": 100
}, {
"text": "2月",
"max": 100
}, {
"text": "3月",
"max": 100
}, {
"text": "4月",
"max": 100
}, {
"text": "5月",
"max": 100
}, {
"text": "6月",
"max": 100
}, {
"text": "7月",
"max": 100
}, {
"text": "8月",
"max": 100
}, {
"text": "9月",
"max": 100
}, {
"text": "10月",
"max": 100
}, {
"text": "11月",
"max": 100
}, {
"text": "12月",
"max": 100
}],
"center": ["75%", "40%"],
"radius": 80
}],
"series": [{
"type": "radar",
"tooltip": {
"trigger": "item"
},
"areaStyle": {},
"data": [{
"value": [60, 73, 85, 40],
"name": "A Software"
}]
}, {
"type": "radar",
"radarIndex": 1,
"areaStyle": {},
"data": [{
"value": [85, 90, 90, 95, 95],
"name": "A Phone"
}, {
"value": [95, 80, 95, 90, 93],
"name": "Another Phone"
}]
}, {
"type": "radar",
"radarIndex": 2,
"areaStyle": {},
"data": [{
"name": "Precipitation",
"value": [2.6, 5.9, 9, 26.4, 28.7, 70.7, 75.6, 82.2, 48.7, 18.8, 6, 2.3]
}, {
"name": "Evaporation",
"value": [2, 4.9, 7, 23.2, 25.6, 76.7, 35.6, 62.2, 32.6, 20, 6.4, 3.3]
}]
}]
}
```