Toggle navigation
pie的点击效果
By
坏人没坏报
2017-01-22 10:47:27
脚本
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
图表已生成
整理代码
刷新
代码
option = { series: [{ name: '心率数据', type: 'pie', radius: ['50%', '70%'], label: { normal: { textStyle: { }, formatter: function(param) { return param.name; } } }, labelLine: { normal: { show: true, length: 10, length2: 20, lineStyle: { } } }, data: [{ "name": "2分钟\n心肺训练", "value": 2, "itemStyle": { "normal": { "color": '#f72c2e' } } }, { "name": "13分钟\n心肺训练", "value": 13, "itemStyle": { "normal": { "color": "#fea621" } } }, { "name": "21分钟\n糖分消耗", "value": 21, "itemStyle": { "normal": { "color": "#98cf44" } } }, { "name": "20分钟\n燃烧脂肪", "value": 20, "itemStyle": { "normal": { "color": "#118b43" } } }, { "name": "4分钟\n动态热身", "value": 4, "itemStyle": { "normal": { "color": "#4b7cde" } } }, { "name": "5分钟\n激活放松", "value": 5, "itemStyle": { "normal": { "color": "#32b6cf" } } }] }, { name: '心率数据', type: 'pie', label: { normal: { position: 'inner', formatter: function(param) { return Math.round(param.percent) + '%'; } } }, radius: ['25%', '70%'], data: [{ "name": "", "value": 2, "itemStyle": { "normal": { "color": '#f72c2e' } } }, { "name": "", "value": 13, "itemStyle": { "normal": { "color": "#fea621" } } }, { "name": "", "value": 21, "itemStyle": { "normal": { "color": "#98cf44" } } }, { "name": "", "value": 20, "itemStyle": { "normal": { "color": "#118b43" } } }, { "name": "", "value": 4, "itemStyle": { "normal": { "color": "#4b7cde" } } }, { "name": "", "value": 5, "itemStyle": { "normal": { "color": "#32b6cf" } } }] }], itemStyle: { normal: { // 阴影的大小 shadowBlur: 0, // 阴影水平方向上的偏移 shadowOffsetX: 0, // 阴影垂直方向上的偏移 shadowOffsetY: 0, // 阴影颜色 shadowColor: 'rgba(0, 0, 0, 0.5)' }, emphasis: { shadowBlur: 30, shadowColor: 'rgba(0, 0, 0, 0.3)' } } } setTimeout(function() { myChart.dispatchAction({ type: 'highlight', seriesIndex: 1, dataIndex: 2 }); }, 10);