barTemplate1 = {
title:{
text:"输入标题",
textStyle:{
color:'#fff',
fontStyle:'normal',
fontWeight:'bold',
fontFamily:'sans-serif',
fontSize:12
}
},
grid: {
top:20,
left:0,
bottom:0,
right:30,
containLabel: true
},
textStyle:{
fontFamily: "Microsoft YaHei",
fontSize: 9,
fontStyle: "normal",
fontWeight: "normal",
color: '#fff'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'none',
textStyle: {
color: '#fff',
fontSize:9
},
},
formatter: function(params) {
return params[0].name + '
' +
"" +
params[0].seriesName + ' : ' + params[0].value.toLocaleString() + '个
'
}
},
xAxis: {
show: false,
type: 'value',
},
yAxis: [{
type: 'category',
inverse: true,
axisLabel: {
show: true,
color: '#fff',
fontSize: 9
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
show: false
},
data: ['类别1', '类别2', '类别3', '类别4', '类别5']
}, {
type: 'category',
inverse: true,
axisTick: 'none',
axisLine: 'none',
show: true,
axisLabel: {
color: '#ffffff',
fontSize: 9,
formatter:function(value) {
return value.toLocaleString()+ '个';
},
},
data: [1,2,3, 4, 5]
}],
series: [{
name: '值',
type: 'bar',
zlevel: 1,
itemStyle: {
normal: {
barBorderRadius: 30,
color:'rgb(46,200,207)'
}
// normal: {
// barBorderRadius: 30,
// color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
// offset: 0,
// color: 'rgb(57,89,255,1)'
// }, {
// offset: 1,
// color: 'rgb(46,200,207,1)'
// }]),
// },
},
barWidth: 5,
data: [1,2,3, 4, 5]
},
{
type: 'bar',
barWidth: 5,
barGap: '-100%',
data: [5,5,5,5, 5],
itemStyle: {
normal: {
color: 'rgba(24,31,68,1)',
barBorderRadius: 30,
}
},
},
]
};
barTemplate1Series=[{
name: '',
type: 'bar',
zlevel: 1,
itemStyle: {
normal: {
color:'rgb(46,200,207)',
barBorderRadius: 30,
}
},
barWidth: 5,
data: []
},
{
type: 'bar',
barWidth: 5,
barGap: '-100%',
data: [5,5,5,5, 5],
itemStyle: {
normal: {
color: 'rgba(24,31,68)',
barBorderRadius: 30,
}
},
},
]