option = {
xAxis: {
type: 'value', //数值轴
axisLabel: {
show: false,
color: "#69cde2",
formatter: function(value, index){
return value;
}
},
splitLine: {
show: false,
lineStyle: {
color: ["#1d3b5a"]
}
},
axisLine: {
show: false,
lineStyle: { color: "#69cde2" }
},
axisTick: {
show: false,
lineStyle: {
type: 'solid',
width: 3
},
length: 2
}
},
yAxis: {
type: 'category',//'category' 类目轴,适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。
// boundaryGap: ['20%', '20%'],
data: ['读特','读创','@深圳','深圳ZAKER','深圳网易'],
axisLabel: { //坐标轴刻度标签的相关设置
color: "#69cde2",
fontSize:16
},
axisLine: { //坐标轴轴线相关设置
lineStyle: { color: "#69cde2"}
},
axisTick: { //坐标轴刻度相关设置
show: false,
lineStyle: {
type: 'solid',
width: 3
},
length: 2
}
},
series: [
{
name: '合格率',
type: 'bar',
label: {
normal: {
show: true,
position: 'left',//标签的位置
distance: -750,
color: '#fff',
fontSize: 16,
// formatter: '{c}'
}
},
barWidth: '50%',
itemStyle: {
normal: {
barBorderRadius: [0,30,30,0],
// color: '#0599c8',
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{
offset: 0,
color: '#00feff'
},
{
offset: 0.5,
color: '#027eff'
},
{
offset: 1,
color: '#0286ff'
}
]
)
}
},
data: khdfwArry,
zlevel: 11
},
{
name: '背景',
type: 'bar',
barWidth: '50%',
barGap: '-100%',
data: [10000, 10000, 10000, 10000, 10000],
itemStyle: {
normal: {
barBorderRadius: [0,30,30,0],
color: '#0d121a'
}
},
zlevel: 9
},
]
};
echarts柱状图
最新推荐文章于 2024-06-24 14:46:04 发布