You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by 夜猫子 <43...@qq.com> on 2021/03/28 14:06:00 UTC

uniapp 调用 echars,移动端上 x轴分段少时特别是只有三个分段时经常两条线中有一条前面两段不显示连线

好像发现问题在哪了,
把线条值大的那条线放在前面就不会有那个现象了,应该是第一条线把第二条线某个部分档住了
我把两条线的顺序调换了一下就没那个现象了
option = {
&nbsp; &nbsp; "grid": {
		"top": "15%",
		"left": "4%",
		"right": "4%",
		"bottom": "3%",
		"containLabel": true
	},
	"legend": {
		"top": "3%",
		"data": ["时段统计汇总", "时段统计"]
	},
	"toolbox": {},
	"tooltip": {
		"trigger": "axis",
		"axisPointer": {
			"type": "line"
		},
		"position": "function() { [native code] }"
	},
	"xAxis": {
		"type": "category",
		"axisLabel": {
			"showMinLabel": true,
			"showMaxLabel": true,
			"rotate": 60
		},
		"axisLine": {
			"show": true
		},
		"axisPointer": {
			"type": "line",
			"lineStyle": {
				"type": "solid",
				"shadowColor": "rgba(0, 0, 0, 0.3)",
				"shadowBlur": 1
			}
		},
		"boundaryGap": true,
		"data": ["2021-03-27 21:00:00", "2021-03-27 21:30:00", "2021-03-27 22:00:00"]
	},
	"yAxis": {
		"show": true,
		"name": "(间)",
		"type": "value",
		"scale": false,
		"axisLine": {}
	},
	"series": [{
		"markPoint": {
			"data": [{
				"type": "max",
				"name": "最大值"
			}, {
				"type": "min",
				"name": "最小值"
			}]
		},
		"name": "时段统计汇总",
		"type": "line",
		"data": [1, 2, 7],
		"itemStyle": {
			"normal": {
				"lineStyle": {
					"width": 3
				}
			}
		}
	},{
		"name": "时段统计",
		"type": "line",
		"data": [1, 1, 5],
		"itemStyle": {
			"normal": {}
		}
	}, ]
};