Toggle navigation
radar1
By
p***g
2018-05-23 07:18:57
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
var data = [{ "name": ["大", "较大", "一般", "较小", "小"], "value": [0, 0, 0, 21.751703, 0] }, { "sum": 21.751703 }] var maxValue = data[1].sum; var colorList = ['#ee2228', '#fb8b1d', '#297fff', '#00f8ff', '#5ec79c']; var areaColor = colorList[data[0].value.indexOf(maxValue)]; option = { backgroundColor: '#333', radar: [{ zlevel: 0, indicator: [{ "color": "#fff", "max": maxValue }, { "color": "#fff", "max": maxValue }, { "color": "#fff", "max": maxValue }, { "color": "#fff", "max": maxValue }, { "color": "#fff", "max": maxValue } ], nameGap: 14, center: ['50%', '45%'], //位置 radius: '63%', //半径 startAngle: 90, splitNumber: 50, shape: 'circle', splitArea: { areaStyle: { color: ['rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', 'rgba(0,0,0,0)', '#04a8d5', ] } }, axisLine: { lineStyle: { color: '#0077c1', opacity: 0.3 } }, splitLine: { lineStyle: { type: 'solid', color: 'transparent', opacity: 0.3 } } }, { zlevel: 5, indicator: [{ "color": "#fff", "text": data[0].name[0], "max": maxValue }, { "color": "#fff", "text": data[0].name[1], "max": maxValue }, { "color": "#fff", "text": data[0].name[2], "max": maxValue }, { "color": "#fff", "text": data[0].name[3], "max": maxValue }, { "color": "#fff", "text": data[0].name[4], "max": maxValue } ], nameGap: 14, center: ['50%', '45%'], //位置 radius: '62.5%', //半径 startAngle: 90, splitNumber: 6, shape: 'circle', splitArea: { areaStyle: { color: 'transparent' } }, axisLine: { lineStyle: { color: '#0077c1', opacity: 0.3 } }, splitLine: { lineStyle: { type: 'solid', color: '#0077c1', opacity: 0.3 } } }, { zlevel: 10, indicator: [{ "color": "#fff", "text": '', "max": maxValue }, { "color": "#fff", "text": '', "max": maxValue }, { "color": "#fff", "text": '', "max": maxValue }, { "color": "#fff", "text": '', "max": maxValue }, { "color": "#fff", "text": '', "max": maxValue } ], nameGap: 8, center: ['50%', '45%'], //位置 radius: '61.9%', //半径 startAngle: 90, splitNumber: 6, shape: 'circle', splitArea: { areaStyle: { color: 'transparent' } }, axisLine: { lineStyle: { color: '#0077c1', opacity: 0.3 } }, splitLine: { lineStyle: { type: 'solid', color: '#0077c1', opacity: 0 } } }], series: [{ radarIndex: 0, zlevel: 0, silent: true, type: 'radar' }, { radarIndex: 1, zlevel: 5, type: 'radar', silent: true, data: [{ value: [maxValue, '', '', '', ''], symbol: 'circle', symbolSize: 12, lineStyle: { normal: { color: 'transparent' } }, itemStyle: { normal: { color: colorList[0] } } }, { value: ['', maxValue, '', '', ''], symbol: 'circle', symbolSize: 12, lineStyle: { normal: { color: 'transparent' } }, itemStyle: { normal: { color: colorList[1] } } }, { value: ['', '', maxValue, '', ''], symbol: 'circle', symbolSize: 12, lineStyle: { normal: { color: 'transparent' } }, itemStyle: { normal: { color: colorList[2] } } }, { value: ['', '', '', maxValue, ''], symbol: 'circle', symbolSize: 12, lineStyle: { normal: { color: 'transparent' } }, itemStyle: { normal: { color: colorList[3] } } }, { value: ['', '', '', '', maxValue], symbol: 'circle', symbolSize: 12, lineStyle: { normal: { color: 'transparent' } }, itemStyle: { normal: { color: colorList[4] } } } ] }, { radarIndex: 2, zlevel: 10, silent: true, type: 'radar', symbolSize: 0, textStyle: { color: '#fff' }, lineStyle: { normal: { color: areaColor, width: 1 } }, areaStyle: { normal: { color: areaColor } }, data: data } ] };