Toggle navigation
饼图延长线,饼图中间设置内容
By
小***乖
2019-04-02 02:43: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
图表已生成
整理代码
刷新
代码
option = { legend: { itemWidth: 15, //图例的宽度 itemHeight: 15, //图例的高度 itemGap: 25, orient: "vertical", right: "10", top: "center", icon: "rect", selectedMode: false, //取消图例上的点击事件 // data: ["4~18岁", "18
80岁"] data: ["4~18岁", "18
80岁"] }, color: ["#33C6F7", "#FFA700", "#FF9090"], //扇形区域以及列表颜色 graphic: [{ type: "text", left: "center", top: "43%", style: { fill: "#686868", text: "总患者数" } }, { type: "text", left: "center", top: "53%", z: 10, style: { text: "3231", font: "30px Microsoft YaHei" } } ], series: [{ type: "pie", radius: ["40%", "60%"], //两个表示环:内半径,外半径 center: ["50%", "50%"], labelLine: { normal: { length: 20//延长线的长度 } }, label: { normal: { // formatter: '{d}%, {c} \n\n', //模板变量有 {a}, {b},{c},{d},{e},分别表示系列名,数据名,数据值等。 formatter: "{per|{d}%} , {c_set|{c}}\n{hr|}\n{a_set|{b}}", padding: [0, -10], rich: { a_set: { color: "#999", lineHeight: 20, align: "center" }, hr: { //设置hr是为了让中间线能够自适应长度 borderColor: "auto", width: "105%", borderWidth: 0.5, height: 0.5 }, per: { padding: [4, 0] } } } }, data: [ { value: 311, name: "4~18岁", selected:true }, { value: 1311, name: "18
80岁" } ] }] }