options={
title: {
text: title,
left: '5%',
top: '5',
textStyle: {
fontSize: 14,
color: 'black'
},
padding: 10
},
grid: {
top: '25%',
bottom: '10%'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
label: {
show: true
}
}
},
xAxis: {
data: [1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月],
axisTick: {
show: true // 隐藏X轴刻度
},
axisLabel: {
show: true,
textStyle: {
color: 'black' // X轴文字颜色
}
},
axisLine: {
show: true,
lineStyle: {
color: '#01FCE3'
}
}
},
yAxis: [
{
type: 'value',
name: '数量',
nameTextStyle: {
color: 'black'
},
splitLine: {
show: false
},
axisTick: {
show: true // 隐藏X轴刻度
},
axisLine: {
lineStyle: {
color: '#01FCE3'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'black'
}
}
},
{
type: 'value',
gridIndex: 0,
min: 50,
max: 100,
splitNumber: 8,
splitLine: {
show: false
},
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
show: false
},
splitArea: {
show: true,
areaStyle: {
color: ['rgba(250,250,250,0.0)', 'rgba(250,250,250,0.05)']
}
}
}
],
series: [
{
type: 'bar',
barWidth: 30,
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#00FFE3'
},
{
offset: 1,
color: '#4693EC'
}
])
}
},
data: [0,0,0,0,0,0,0,0,0,0,1,5]
}
]
}
option={
title: {
text: title,
left: '5%',
top: '5',
textStyle: {
fontSize: 14,
color: 'black'
},
padding: 10
// backgroundColor: '#1E9FFF'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: 'blue'
}
}
},
legend: {
type: 'plain',
top: 15,
data: [{ name: '', icon: 'rect', textStyle: { color: '#1E9FFF' }}]
},
grid: {
top: '60',
left: '9%',
right: '5%',
bottom: '5%',
containLabel: true
},
toolbox: {
right: 30,
top: 10,
feature: {
dataView: { show: true, readOnly: false },
magicType: { show: true, type: ['line', 'bar'] },
restore: { show: true },
saveAsImage: { show: true }
}
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
rotate: -45,
interval: 0
},
data: [0,0,0,0,0,0,0,0,0,0,1,5]
},
yAxis: {
type: 'value'
},
series: [
{
type: 'line',
data: data,
itemStyle: {
normal: {
color: '#2AC9FD'
}
}
}
]
}
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/ygkyufcl/article/details/111246303