echarts一条柱状图显示两个值,类似进度条

echarts⼀条柱状图显⽰两个值,类似进度条
var allUseDayChartTwo;
function allUseDayChartTwoFun(obj,xdata,ydata,zdata){
allUseDayChartTwo = echarts.init(obj);
var category = xdata;
var lineData = zdata;
var barData = ydata;
option = {
//  backgroundColor:'#F00',
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(0,0,0,.5)',
axisPointer: {
type: 'shadow',
label: {
show: true,
backgroundColor: '#F1F1F1',
color:'#5A5A5A'
}
},
confine: true
},
grid: {
left: '1%',
right: '3%',
bottom: '5%',
top: '5%',
containLabel: true
},
xAxis: {
axisLine: {
lineStyle: {硫铁矿制硫酸
color: '#B4B4B4'
}
},
axisTick:{
show:false,
},
axisLine:{
show:false
},
axisTick:{
炉灶节能器show:false
},
splitLine:{
show:false
},
axisLabel:{la-5
textStyle: {
fontSize: 14,
},
formatter:'{value} ',
},
},
yAxis: [{
乳化液废水处理
data: category,
splitLine: {show: false},
axisLine: {
lineStyle: {
color: '#B4B4B4',
axisLabel:{
textStyle: {
fontSize: 14,
//                  color: '#B2B2B2'
},
formatter:'{value} ',
},
axisLine:{
show:false
},
axisTick:{
show:false
},
splitLine:{
show:false
}
}
/
/    ,{
//  data: category,
//        splitLine: {show: false},
//        axisLine: {
//            lineStyle: {
//                color: '#B4B4B4',
//            }
//        },
//        axisLabel:{
//            formatter:'{value} ',
//        }
/
/    }
],
series: [{
name: '⽤量',
type: 'bar',
barWidth: 15,
barGap: '-100%',
itemStyle: {
normal: {
barBorderRadius: 5,
color: aphic.LinearGradient(
0, 0, 0, 1,
[
{offset: 0, color: 'rgba(88,228,88,0.8)'},                        {offset: 1, color: 'rgba(88,228,88,0.8)'}
]
)
}
},
data: barData
},{
name: '阈值',
type: 'bar',
barGap: '-100%',
barWidth: 15,
itemStyle: {
normal: {
barBorderRadius: 5,
color: aphic.LinearGradient(
三基荧光粉
0, 0, 0, 1,
[
{offset: 0, color: 'rgba(234,234,234,0.8)'},                        {offset: 0.2, color: 'rgba(234,234,234,1)'},                        {offset: 1, color: 'rgba(234,234,234,1)'}                    ]
},平衡木多宽
z: -12,
data: lineData
}
//    ,{
//        name: '背景',
//        type: 'bar',
//        barGap: '-100%',
//        barWidth: 15,
//        itemStyle: {
//            normal: {
//                barBorderRadius: 5,
//                color: aphic.LinearGradient( //                    0, 0, 0, 1,
/
/                    [
//                        {offset: 0, color: 'rgba(0,0,0,0.2)'},
//                        {offset: 0.2, color: 'rgba(0,0,0,0.)'},
//                        {offset: 1, color: 'rgba(0,0,0,0.24)'}
//                    ]
//                )
//            }
//        },
//        z: -20,
//        data: [50,50,50,50,50,50,50,50,50]
//    }
]
};
allUseDayChartTwo.setOption(option);
}

本文发布于:2024-09-23 08:22:25,感谢您对本站的认可!

本文链接:https://www.17tex.com/tex/1/188834.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议