样式
![在这里插入图片描述](https://img-blog.csdnimg.cn/be100d3dd8c1427bb542f1dea5baac98.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA5a2b5YS_5Y-q5pakwrfoi4_ml6XlqJw=,size_20,color_FFFFFF,t_70,g_se,x_16)
代码
option = {
tooltip: {
trigger: 'item',
axisPointer: {
type: 'shadow'
},
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: {
alignWithLabel: true
}
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: "",
type: "pictorialBar",
symbolSize: [30, 22],
symbolOffset: [0, 10],
z: 12,
itemStyle: {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: "rgba(89,211,255,1)"
},
{
offset: 1,
color: "rgba(23,237,194,1)"
}
])
}
},
data: [10, 52, 200, 334, 390, 330, 220],
},
{
name: '',
type: 'bar',
barWidth: 30,
barGap: '0%',
itemStyle: {
"normal": {
"color": {
"x": 0,
"y": 0,
"x2": 0,
"y2": 1,
"type": "linear",
"global": false,
"colorStops": [{
"offset": 0,
"color": "rgba(0,255,245,0.5)"
}, {
"offset": 1,
"color": "#43bafe"
}]
}
}
},
data: [10, 52, 200, 334, 390, 330, 220],
},
{
name: "",
type: "pictorialBar",
symbolSize: [30, 22],
symbolOffset: [0, -10],
z: 12,
symbolPosition: "end",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0,0,0,1,
[{
offset: 0,
color: "rgba(89,211,255,1)"
},
{
offset: 1,
color: "rgba(23,237,194,1)"
}
],
false
),
}
},
data: [10, 52, 200, 334, 390, 330, 220],
}
]
};