Toggle navigation
占比
By
丫***咚
2018-03-19 08:47:02
脚本
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 = 20; option = { backgroundColor: 'transparent', grid: [{ show: false, backgroundColor: 'rgba(0,0,0,0)', borderWidth: 0, top: '-20%' }], title: { text: data + '%', x: '50%', y: parseInt('100%') * 0.44 + '%', textAlign: "center", textStyle: { fontWeight: 'normal', color: '#fff', fontSize: parseInt("100%") * 0.6 }, borderColor: 'transparent', z: 100 }, legend: { bottom: '0', textStyle: { color: '#fff' }, data: ["占比"] }, tooltip: { show: false }, series: [ // 最底层圆圈 { name: '遮罩1', type: 'pie', hoverAnimation: false, hoverOffset: 0, clickable: false, tooltip: { show: false }, z: 1, radius: ['0%', '60%'], itemStyle: { normal: { color: 'rgba(3,12,60,.9)', label: { show: false }, labelLine: { show: false } }, emphasis: { show: false } }, labelLine: { normal: { show: false }, emphasis: { show: false } }, label: { normal: { show: false }, emphasis: { show: false } }, data: [{ value: 100 }] }, { name: '遮罩2', type: 'pie', hoverAnimation: false, hoverOffset: 0, // startAngle: 85, stillShowZeroSum: true, clickable: false, tooltip: { show: false }, z: 2, radius: ['0%', '15%'], itemStyle: { normal: { color: 'transparent', borderColor: '#424663', borderType: 'dashed' }, emphasis: { show: false } }, labelLine: { normal: { show: false }, emphasis: { show: false } }, label: { normal: { show: false }, emphasis: { show: false } }, data: [{ value: 25 }] }, { name: '遮罩4', type: 'pie', hoverAnimation: false, hoverOffset: 0, stillShowZeroSum: true, clickable: false, tooltip: { show: false }, z: 2, radius: ['30%', '45%'], itemStyle: { normal: { color: 'transparent', borderColor: '#424663', borderWidth: 2, borderType: 'dashed' }, emphasis: { show: false } }, labelLine: { normal: { show: false }, emphasis: { show: false } }, label: { normal: { show: false }, emphasis: { show: false } }, data: [{ value: 25 }] }, { name: '遮罩5', type: 'pie', hoverAnimation: false, hoverOffset: 0, // startAngle: 85, stillShowZeroSum: true, clickable: false, tooltip: { show: false }, z: 2, radius: ['45%', '60%'], itemStyle: { normal: { color: 'transparent', borderColor: '#424663', borderWidth: 3, borderType: 'dashed' }, emphasis: { show: false } }, labelLine: { normal: { show: false }, emphasis: { show: false } }, label: { normal: { show: false }, emphasis: { show: false } }, data: [{ value: 25 }] }, // 斜线 { type: 'pie', hoverAnimation: false, z: 7, startAngle: 240, hoverOffset: 0, clickable: false, radius: '43%', roseType: 'area', itemStyle: { normal: { color: 'rgba(255,255,255,0)', borderColor: '#fff', borderWidth: 2 }, emphasis: { show: false } }, labelLine: { normal: { show: false }, emphasis: { show: false } }, label: { normal: { show: false }, emphasis: { show: false } }, data: [{ value: 50 }, { value: 50 }] }, { type: 'pie', hoverAnimation: false, z: 7, startAngle: 240, hoverOffset: 0, clickable: false, radius: '15%', roseType: 'area', itemStyle: { normal: { color: 'transparent', borderColor: '#1a224d', borderWidth: 4 }, emphasis: { show: false } }, labelLine: { normal: { show: false }, emphasis: { show: false } }, label: { normal: { show: false }, emphasis: { show: false } }, data: [{ value: 50 }, { value: 50 }] }, //内圈 { name: '遮罩', type: 'pie', hoverAnimation: false, hoverOffset: 0, clickable: false, tooltip: { show: false }, z: 7, radius: ['38%', '45%'], itemStyle: { normal: { color: 'rgb(255,255,255)', label: { show: false }, labelLine: { show: false } }, emphasis: { show: false } }, labelLine: { normal: { show: false }, emphasis: { show: false } }, label: { normal: { show: false }, emphasis: { show: false } }, data: [{ value: 100 }] }, // 外圈 { type: 'pie', radius: ['45%', '60%'], hoverAnimation: false, z: 12, color: ["#44d3e2", "transparent"], itemStyle: { normal: { show: false }, emphasis: { show: false } }, labelLine: { normal: { show: false }, emphasis: { show: false } }, label: { normal: { show: false }, emphasis: { show: false } }, data: [{ value: data, name: '占比' }, { value: 100 - data }] } ] };