Echarts sets gradient background for bar chart when mouse hovers

Effect:

Insert image description here

Just set axisPointer in tooltip

Insert image description here

axisPointer : {
	type : 'shadow',
	shadowStyle: {
		color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
			{ offset: 0, color: 'rgba(0, 253, 255, 0.6)' },
			{ offset: 1, color: 'rgba(73, 201, 229, 0)' },
		]),
		width:'auto'
	},
}

 

Guess you like

Origin blog.csdn.net/ljy_1024/article/details/124176470