ehcart折线图,最大值,最小值,平均值自定义给数据画线

let data = [1,2,4,9,8,7]
let min=-10,max=10
let series=[
	{
		type: 'line',
		barGap: 0,
		symbolSize: 5,
		// color:'#89DBF5',
		color:this.lineColors[v],
		connectNulls:true,  //是否连接空数据。
		data: data,
	}
	]
series[0].markLine= {
	symbol: ['none', 'none'],
	silent: true,
	lineStyle: {
		normal: {
			type: 'dashed',
			color: 'rgba(255,255,255,.3)',
			width: 1,
		}
	},
	data: [
		{
		name: '最大值',
		yAxis: max
		},
		{
		name: '最小值',
		yAxis: min
		},
		// {type:'average',},//平均值
		// {type:'max'},//最小值
		// {type:'min'},//最大值
	],
	label: {
		show: true,
		position: 'start',
		color: '#fff'
	},
}

猜你喜欢

转载自blog.csdn.net/qq_26841153/article/details/131232707