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)环状图的更多相关文章

  1. echarts相关属性设置(1)折线图篇

    option = { tooltip: { trigger: 'axis', // axisPointer: { // type: 'cross', // label: { // background ...

  2. echarts相关属性设置(2)--折线图和柱状图的结合使用

    type:bar和line的组合 option = { { tooltip: { trigger: 'axis', axisPointer: { // type: 'shadow' }, // lab ...

  3. UILabel的相关属性设置

    在iOS编程中UILabel是一个常用的控件,下面分享一下UILabel的相关属性设置的方法. 很多学习iOS6编程都是从storyboard开始,用到UILabel时是将控件拖到storyboard ...

  4. iOS开发笔记--UILabel的相关属性设置

    在iOS编程中UILabel是一个常用的控件,下面分享一下UILabel的相关属性设置的方法. 很多学习iOS6编程都是从storyboard开始,用到UILabel时是将控件拖到storyboard ...

  5. echarts图表属性设置

    原地址:http://blog.csdn.net/she_lover/article/details/51448967theme = { // 全图默认背景 // backgroundColor: ‘ ...

  6. 设置TextBlock默认样式后,其他控件的Text相关属性设置失效问题

    问题: 定义了默认TextBlock样式后,再次自定义下拉框 or 其他控件 ,当内部含有TextBlock时,设置控件的字体相关样式无效,系统始终使用TextBlock设置默认样式 解决方案: 为相 ...

  7. 基于Composer Player 模型加载和相关属性设置

    主要是基于达索软件Composer Player.的基础上做些二次开发. public class ComposerToolBarSetting { public bool AntiAliasingO ...

  8. EditText相关属性设置

    1.默认不弹出软件盘 在AndroidManifest.xml设置: <activity            android:name="com.demo.Activity" ...

  9. CSS基础 阴影相关属性设置

    一.字体阴影属性名:text-shadow:水平偏移量 垂直偏移量 模糊度 阴影颜色: html代码: <div>农夫山泉有点甜</div>css代码: div{ font-s ...

随机推荐

  1. php date之间的相互转换

    字符串转成date $str =date("Y-m-d H:i:s",strtotime("2011-12-12 14:23:01")); echo $str; ...

  2. cc、gcc、g++区别

    gcc是C编译器:g++是C++编译器:linux下cc一般是一个符号连接,指向gcc:gcc和g++都是GUN(组织)的编译器.而CC则一般是makefile里面的一个名字,即宏定义,嘿,因为Lin ...

  3. failed to load AppCompat ActionBar with unkNown error

    解决办法: 在AndroidManifest.xml文件中找到 全局样式文件 Theme,如图: 进入到这个文件,在前面增加 "Base".,如图:

  4. h5 placeholder 设置无效

    下面设置方式无效: ::-webkit-input-placeholder { /* WebKit browsers */ color: #999; } :-moz-placeholder { /* ...

  5. 对于URL中文和特殊字符的处理方法

    1.中文的处理方法 NSString* string1 = @"https://www.cloudsafe.com/文件夹"; NSString* string2 = [strin ...

  6. git项目.gitignore文件不生效解决办法

    配置好.gitignore文件如下: HELP.md /target/ !.mvn/wrapper/maven-wrapper.jar ### STS ### .apt_generated .clas ...

  7. Normalize.css 与传统的 CSS Reset 有哪些区别?

    CSS Reset 是革命党,CSS Reset 里最激进那一派提倡不管你小子有用没用,通通给我脱了那身衣服,凭什么你 body 出生就穿一圈 margin,凭什么你姓 h 的比别人吃得胖,凭什么你 ...

  8. HDU3666 THE MATRIX PROBLEM (差分约束+取对数去系数)(对退出情况存疑)

    You have been given a matrix C N*M, each element E of C N*M is positive and no more than 1000, The p ...

  9. div显示2列

    #wdjContainer{ border:1px solid green; margin:10px auto; width:500px; height:300px; line-height:30px ...

  10. [转]git merge 跟 git merge -no-ff

    根据这张图片可以看出 git merge –no-ff 可以保存你之前的分支历史.能够更好的查看 merge历史,以及branch 状态. git merge 则不会显示 feature,只保留单条分 ...