echarts相关属性设置(3)环状图
option = {
grid: {
left: '3%',
top: '0%',
// height: 500,
right: '30%',
containLabel: true,
},
legend: {
orient: 'vertical',
align: 'left', //图例小图标在图例文字的哪个方向,这里设置为左侧
y: 'top',
x: 'right',
icon: 'circle', //设置图例小图标的样式,这里控制
right: '0%',
textStyle: {
color: '#999',
fontSize: 10,
rich: {
white: {
color: 'white',
fontSize: 10,
},
},
},
itemWidth: 5,
itemHeight: 5,
data: ['名称1', '名称2', '名称3', '名称4'],
formatter(name: any) { //给图例进行设置(有名称,有数据,有单位)
const data = res.series[0].data;
const idx = findIndex(data, (it: any) => it.name === name);
if (idx !== -1) {
return `${name}: {white|${data[idx].value}}票`;
}
return name;
},
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}:{d}%',
},
series: [{
name: '大名城',
type: 'pie',
radius: ['30%', '50%'],
color: ['#00d395', '#1616fb', '#6a00fd', '#009fff'],
center: ['25%', '32%'],
x: '0%', // for funnel
data: [{
value: this.arrivrdWithoutUnloda,
name: '名称1',
}, {
value: this.unloadWithoutSort,
name: '名称2',
}, {
value: this.sortedWithoutLoad,
name: '名称3',
}, {
value: this.loadedWithoutDepart,
name: '名称4',
}],
labelLine: {
normal: {
show: false,
length: 3,
length2: 3,
lineStyle: {
color: '#12EABE',
width: 1,
},
},
},
label: {
normal: {
show: false,
// formatter: '{c|{b}}\n{d|{d}%}',
// rich: {
// b: {
// fontSize: 10,
// color: '#12EABE',
// align: 'left',
// padding: 0,
// },
// d: {
// fontSize: 10,
// align: 'left',
// padding: 0,
// },
// c: {
// color: '#fff',
// fontSize: 10,
// align: 'left',
// padding: 0,
// },
// },
},
},
}],
}
echarts相关属性设置(3)环状图的更多相关文章
- echarts相关属性设置(1)折线图篇
option = { tooltip: { trigger: 'axis', // axisPointer: { // type: 'cross', // label: { // background ...
- echarts相关属性设置(2)--折线图和柱状图的结合使用
type:bar和line的组合 option = { { tooltip: { trigger: 'axis', axisPointer: { // type: 'shadow' }, // lab ...
- UILabel的相关属性设置
在iOS编程中UILabel是一个常用的控件,下面分享一下UILabel的相关属性设置的方法. 很多学习iOS6编程都是从storyboard开始,用到UILabel时是将控件拖到storyboard ...
- iOS开发笔记--UILabel的相关属性设置
在iOS编程中UILabel是一个常用的控件,下面分享一下UILabel的相关属性设置的方法. 很多学习iOS6编程都是从storyboard开始,用到UILabel时是将控件拖到storyboard ...
- echarts图表属性设置
原地址:http://blog.csdn.net/she_lover/article/details/51448967theme = { // 全图默认背景 // backgroundColor: ‘ ...
- 设置TextBlock默认样式后,其他控件的Text相关属性设置失效问题
问题: 定义了默认TextBlock样式后,再次自定义下拉框 or 其他控件 ,当内部含有TextBlock时,设置控件的字体相关样式无效,系统始终使用TextBlock设置默认样式 解决方案: 为相 ...
- 基于Composer Player 模型加载和相关属性设置
主要是基于达索软件Composer Player.的基础上做些二次开发. public class ComposerToolBarSetting { public bool AntiAliasingO ...
- EditText相关属性设置
1.默认不弹出软件盘 在AndroidManifest.xml设置: <activity android:name="com.demo.Activity" ...
- CSS基础 阴影相关属性设置
一.字体阴影属性名:text-shadow:水平偏移量 垂直偏移量 模糊度 阴影颜色: html代码: <div>农夫山泉有点甜</div>css代码: div{ font-s ...
随机推荐
- Linux下MySQL、Apache、PHP源码安装全程实录(CentOS 6.4)
转自http://www.zjmainstay.cn/lamp-config 本文记录了我自己配置LAMP的全过程,借此记录一下,同时希望能够帮助一下需要帮助的LINUX新人,跟我一起学习,一起进步. ...
- SQL server 备份/恢复/压缩 进度查询
第一步,用 sp_who2 查出备份的sid(或在窗口中的连接属性中看) exec sp_who2 第二步,用以下查询获得运行情况(看 percent_complete列) SELECT sessio ...
- dhclient命令
语法:dhclient(选项)(参数) 选项0:指定dhcp客户但监听的端口号-d:总是以前台方式运行程序-q:安静模式,不打印任何错误的提示信息-r:释放ip地址 参数:网络接口:操作的网络接口 示 ...
- 使用geolocation
The geolocation object geolocation API建立在navigator.geolocation 上. 如果对象存在,才可以使用定位服务. if ("geoloc ...
- hdu-5762 Teacher Bo(抽屉原理+暴力)
题目链接: Teacher Bo Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Other ...
- Opencv— — Color Gradient
// define head function #ifndef PS_ALGORITHM_H_INCLUDED #define PS_ALGORITHM_H_INCLUDED #include < ...
- SPOJcot2 Count on a tree II (树上莫队)
You are given a tree with N nodes. The tree nodes are numbered from 1 to N. Each node has an integer ...
- Piggy-Bank(复习完全背包)
传送门 题目大意: 有一个存钱的储存罐,给你它存满钱之前和之后的重量,和几类硬币的面值和重量. 求装满储钱罐时最小能得到多少钱. 题解:完全背包变形. 因为要求最小 一开始赋值大数. code: #i ...
- mybatis编写流程(老版本的方式,新版本用接口式编程)
1.根据xml配置文件(全局配置文件)创建一个SqlSessionFactory对象 有数据源一些运行环境信息2.sql映射文件:配置了每一个sql,以及sql的封装规则等. 3.将sql映射文件注 ...
- HDU2159(完全背包)
FATE Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Description ...