echarts 饼图进度条_Echarts圆环,初始化时进度条效果

通过Echarts库创建一个动态的饼图进度条,初始值为80%,展示了一种圆环形进度条的实现方式。配置包括背景颜色、标题、半径、角度范围、数据以及渐变颜色等细节,适用于数据可视化场景。
摘要由CSDN通过智能技术生成

let value = 80; //值

let valuetxt = value + '%';

let values= 100 -value;

let endA= 100 -value;

option={

backgroundColor:'#051F54',

title: {

text:'{a|' + valuetxt + '}',

x:'center',

y:'center',

textStyle: {

rich: {

a: {

fontSize:18,

color:'#FF7123'}

}

}

},

series: [{

name:"",

type:"gauge",

animationThreshold:false,

radius:"50%",

center: ['50%', '50%'],

startAngle:90,

endAngle: endA,

axisLabel: {

show:false},

pointer: {

show:false},

detail: {

show:false},

data: [{

value:1,

name:""}]

},

{

name:"",

type:"pie",

radius: ["40.28%", "54.68%"],

center: ['50%', '50%'],

startAngle:270,

z:4,

label: {

normal: {

show:false}

},

data: [{

value: value,

name:"",

label: {

normal: {

show:false}

},

itemStyle: {

color:new echarts.graphic.LinearGradient(0, 1, 0, 0, [{

offset:0,

color:'red'}, {

offset:1,

color:'red'}])

}

},

{

value: values,

name:"",

label: {

normal: {

show:false}

},

itemStyle: {

normal: {

color:"transparent"}

}

}

]

},

{

type:'pie',

name:'内层细圆环',

animationThreshold:false,

radius: ['40%', '55%'],

itemStyle: {

normal: {

color:'#ddd'}

},

label: {

show:false},

data: [100]

}

]

};

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值