Toggle navigation
雷达图
By
名***取
2019-05-24 06:53:40
脚本
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 positive = [190, 250, 120, 150, 300]; var discipline = [160, 150, 260, 285, 140]; // 合并数组 var newArr = positive.concat(discipline); // 按大到小排序 var isMax = newArr.sort(function(a, b) { return b - a }); isMax = getMaxOfArray(isMax); // 获取最大值 function getMaxOfArray(data) { return Math.max.apply(null, data); } var data = [{ name: '党团活动', max: isMax }, { name: '实践活动', max: isMax }, { name: '艺术修养', max: isMax }, { name: '身心健康', max: isMax }, { name: '实践活动', max: isMax } ] option = { tooltip: { // trigger: 'item' // 默认 }, radar: { name: { textStyle: { color: '#333', fontSize: '14' // 有背景色的时候设置 // borderRadius: 3, // padding: [3, 5] } }, radius: '70%', center: ['50%', '50%'], indicator: data, nameGap: 25, // 指示器名称和指示器轴的距离 splitArea: { show: false, }, axisLine: { show: false // 指向外圈文本的分隔线不显示 }, splitNumber: 4, // 配合 splitLine=>color控制只显示几个边框线 splitLine: { lineStyle: { color: '#254369', // 给透明度为 0 不显示线条 // color: ['#254369', 'rgba(255,255,255,0)', 'rgba(255,255,255,0)', 'rgba(255,255,255,0)', 'rgba(255,255,255,0)'], width: 1, } } }, color: [], // 去除统计图形块边框线 series: [{ name: '各类活动次数', type: 'radar', symbolSize: 0, // 去掉小圆点 data: [{ value: positive, name: '正向考评', areaStyle: { normal: { color: '#e7e906' } } }, { value: discipline, name: '违纪考评', areaStyle: { normal: { color: '#4cecf0' } } } ] }] };