-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathappradar.html
More file actions
147 lines (139 loc) · 4.13 KB
/
appradar.html
File metadata and controls
147 lines (139 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!--
此示例下载自 https://echarts.apache.org/examples/zh/editor.html?c=radar
-->
<!DOCTYPE html>
<html lang="en" style="height: 100%">
<head>
<meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
<div id="container" style="height: 100%"></div>
<script type="text/javascript" src="https://registry.npmmirror.com/echarts/5.5.1/files/dist/echarts.min.js"></script>
<!-- Uncomment this line if you want to dataTool extension
<script type="text/javascript" src="https://registry.npmmirror.com/echarts/5.5.1/files/dist/extension/dataTool.min.js"></script>
-->
<!-- Uncomment this line if you want to use gl extension
<script type="text/javascript" src="https://registry.npmmirror.com/echarts-gl/2/files/dist/echarts-gl.min.js"></script>
-->
<!-- Uncomment this line if you want to echarts-stat extension
<script type="text/javascript" src="https://registry.npmmirror.com/echarts-stat/latest/files/dist/ecStat.min.js"></script>
-->
<!-- Uncomment this line if you want to echarts-graph-modularity extension
<script type="text/javascript" src="https://registry.npmmirror.com/echarts-graph-modularity/2/files/dist/echarts-graph-modularity.min.js"></script>
-->
<!-- Uncomment this line if you want to use map
<script type="text/javascript" src="https://registry.npmmirror.com/echarts/4.9.0/files/map/js/world.js"></script>
-->
<!-- Uncomment these two lines if you want to use bmap extension
<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=YOUR_API_KEY"></script>
<script type="text/javascript" src="https://registry.npmmirror.com/echarts/5.5.1/files/dist/extension/bmap.min.js"></script>
-->
<script type="text/javascript">
var dom = document.getElementById('container');
var myChart = echarts.init(dom, null, {
renderer: 'canvas',
useDirtyRect: false
});
var app = {};
var option;
option = {
title: {
text: 'APP功能差距对比',
textStyle: {
fontSize: 20
},
left: 'center',
top: '2%'
},
tooltip: {
trigger: 'item',
formatter: function(params) {
// 计算平均分
const avg = params.value.reduce((a, b) => a + b, 0) / params.value.length;
// 获取所有维度的值
const indicators = [
'设备方案选型',
'设备部署&网络开局',
'网络测试验收',
'日常网络管理监控',
'排障工具',
'多平台联动',
'UI体验'
];
let result = `${params.name}<br/>平均分:${avg.toFixed(1)}<br/>`;
// 添加每个维度的具体分数
params.value.forEach((val, index) => {
result += `${indicators[index]}:${val}<br/>`;
});
return result;
}
},
legend: {
data: ['Unifi', 'Ruijie Reyee', 'Omada'],
textStyle: {
fontSize: 14
},
bottom: '5%',
left: 'center'
},
radar: {
indicator: [
{ name: '设备方案选型', max: 10 },
{ name: '设备部署&网络开局', max: 10 },
{ name: '网络测试验收', max: 10 },
{ name: '日常网络管理监控', max: 10 },
{ name: '排障工具', max: 10 },
{ name: '多平台联动', max: 10 },
{ name: 'UI体验', max: 10 }
],
nameGap: 10,
axisName: {
fontSize: 14
}
},
series: [
{
name: '平台功能对比',
type: 'radar',
data: [
{
value: [0.5, 6, 7, 8, 0.5, 9, 9],
name: 'Unifi',
areaStyle: {
opacity: 0.3
},
lineStyle: {
width: 2
}
},
{
value: [8, 7, 8, 8, 7, 2, 8],
name: 'Ruijie Reyee',
areaStyle: {
opacity: 0.3
},
lineStyle: {
width: 2
}
},
{
value: [0.5, 6, 6, 5, 7, 0.5, 7],
name: 'Omada',
areaStyle: {
opacity: 0.3
},
lineStyle: {
width: 2
}
}
]
}
]
};
if (option && typeof option === 'object') {
myChart.setOption(option);
}
window.addEventListener('resize', myChart.resize);
</script>
</body>
</html>