一、代码

 app.title = '通讯盒各版本用户占比';

 option = {
backgroundColor: '#0f0f31',
title: {
show:true,
x:"left",
text: '通讯盒各版本用户占比',
textStyle:{
fontSize:16
,fontWeight:'normal'
,color:'#72a1d2'
},
left:20,
top:10,
borderColor :'#10395c',
borderWidth :2,
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}: {c} ({d}%)"
},
series: [
{
name:'通讯盒各版本用户占比',
type:'pie',
radius:['10%','18%'],
avoidLabelOverlap:false,
color:['#32A8FF',' #02C800','#9f47fd'],
formatter: '{b}: {d}',
markLine :{
label :{
show:true,
position :'outside'
},
},
labelLine:{
normal:{
length:14 ,
length2 :56,
}
},
label :{
formatter: [
'{d}%',
'{b}'
].join('\n'),
verticalAlign :'bottom',
position:'outside',
//textShadowOffsetY :10,
align :'right',
color:'white',
height :36,
rich: {
a: {
verticalAlign:'bottom',
// 没有设置 `verticalAlign`,则 `verticalAlign` 为 bottom
}
}
}, data:[{value:68,name:'YBT1',label: {
normal: {
textStyle: {
color: '#508DFF' // 改变标示文字的颜色
}
}
},itemStyle:{
normal:{
color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上 offset: 0,
color: '#508DFF'
}, {
offset: 1,
color: '#26C5FE'
}])
}
}},{value:18,name:'YBT2',label: {
normal: {
textStyle: {
color: '#63E587' // 改变标示文字的颜色
}
}
},itemStyle:{
normal:{
color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上 offset: 0,
color: '#63E587'
}, {
offset: 1,
color: '#5FE2E4'
}])
}
}},{value:14,name:'YBT3',label: {
normal: {
textStyle: {
color: '#9f47fd' // 改变标示文字的颜色
}
}
},itemStyle:{
normal:{
color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
//颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
offset: 0,
color: '#9f47fd'
}, {
offset: 1,
color: '#9f47fd'
}])
}
}}]
},{
name:'',
type:'pie',
radius:['8%','10%'],
avoidLabelOverlap:false,
legendHoverLink :false,
label:{
show:false,
},
tooltip:{//禁止鼠标悬停显示提示框
show:false,
},
hoverAnimation:false ,//禁止鼠标悬停放大区域
color:['#bcdbfa'],
data:[{value:'100'}]
}
]
};

二、效果图

利用echarts自定义环形图的更多相关文章

  1. echarts实现环形图

    前端框架使用的angular,使用echarts实现环形图 1. item.component.html <div id="box1" class="pie&quo ...

  2. echarts自定义折线图横坐标时间间隔踩坑总结

    折线图需求:横坐标为时间,要求按一定间隔展示,鼠标移至折线上间隔时间内的数据也可展示 其实很简单的一个配置就可搞定,但在不熟悉echarts配置的情况下,就很懵逼 xAxis: { boundaryG ...

  3. Android中自定义环形图2

    如图: 自定义属性,在values文件夹下创建 attrs.xml <?xml version="1.0" encoding="utf-8"?> & ...

  4. Android中自定义环形图

    如图: 自定义view package com.riverlet.ringview; import android.animation.ObjectAnimator; import android.c ...

  5. echarts画环形图

    alarmManage(){ let drawLine = echarts.init(document.getElementById('data-alarmManage-table-wrap')); ...

  6. Qt编写自定义控件41-自定义环形图

    一.前言 自定义环形图控件类似于自定义饼状图控件,也是提供一个饼图区域展示占比,其实核心都是根据自动计算到的百分比绘制饼图区域.当前环形图控件模仿的是echart中的环形图控件,提供双层环形图,有一层 ...

  7. 修改echarts环形图的牵引线及文字位置

    修改echarts环形图的牵引线及文字位置,下面代码及效果不仅如此,也包含了其它的效果哦.有问题可以留言. 根据echarts官方示例修改效果: 官方示例图: 修改效果图: 直接上代码:其它不多说. ...

  8. vue 结合 Echarts 实现半开环形图

    Echarts 实现半开环形图 1.先看看实现的图 2.HTML部分 创建id 是 chart 的div标签. <div class="content-item"> & ...

  9. echarts白色实心环形图(空心饼图)的编写

    // 数据接入机构统计let myDom = document.getElementById('myChart');let myWidth = myDom.offsetWidth - 5; // 获取 ...

随机推荐

  1. ASP.NET Core 注入和获取 AppSettings 配置

    ASP.NET Core 项目中有个appsettings.json配置文件,用于存放一些配置信息,比如数据库连接字符串等,但访问的话,只能在 ASP.NET Core 项目中获取,如果我们在其他项目 ...

  2. Learning WCF:A Simple Demo

    This is a very simple demo which can help you create a wcf applition quickly. Create a Solution Open ...

  3. 完善版封装canvas分享组件

    import regeneratorRuntime from "../../../lib/regenerator-runtime/runtime"; let ctx = false ...

  4. Redis简明教程

    redis是什么: Redis is an open source, BSD licensed, advanced key-value store. It is often referred to a ...

  5. Python常用模块os & sys & shutil模块

    OS模块 import os ''' os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径 os.chdir("dirname") 改变当前脚本工作目录: ...

  6. 学生成绩管理系统3.0(JSP+Servlet+MySQL)

    源代码:戳这里! (2019-01-08 更新 惊讶于这么久了还有人看这个项目 于是把代码传到 github 了(辣鸡CSDN) https://github.com/G-lory/StudentAc ...

  7. python之有用的3个内置函数(filter/map/reduce)

    这三个内置函数还是非常有用的,在工作中用的还不少,顺手,下面一一进行介绍 1.filter 语法:filter(function,iterable) 解释:把迭代器通过function函数进行过滤出想 ...

  8. 13-03 Java 基本类型包装类概述,Integer类,Character

    基本类型包装类概述 将基本数据类型封装成对象的好处在于可以在对象中定义更多的功能方法操作该数据.常用的操作之一:用于基本数据类型与字符串之间的转换.基本类型和包装类的对应Byte,Short,Inte ...

  9. centos 7 添加windows 字体

    环境: centos 7 mono 5.2  Asp.net MVC5 问题: 在生成验证码时报,验证码无法显示,字体集找不到 解决: 到windows 系统中,拷贝字体到centos中. windo ...

  10. NAT转换、VLAN与Trunk(特典:ACL初步)

    一.NAT(网络地址转换) 即公有地址转换为私有地址 私有地址段(非公网地址,即公网不识别) A       10.0.0.0            10.255.255.255 B       17 ...