uniapp使用ucharts横向拖动图表

效果图

使用方法:先保证xAxis添加了itemCount,其次加上enableScroll: true并配上ontouch='true'使用。

<qiun-data-charts type="mount" :ontouch='true' :opts="opts" :chartData="chartsDataMount" />
opts: {
          extra: {
			   mount: {
						type: 'bar',
						widthRatio: 0.3,
						borderWidth: 0,
						barBorderRadius: [50, 50, 50, 50],
						linearType: 'custom'
					}
				},
				enableScroll: true, //开启拖拽(这项和xAxis中的itemCount一定要有)
				xAxis: {
					disableGrid: true,
					itemCount: 5
				}
}
				

猜你喜欢

转载自blog.csdn.net/m0_58665272/article/details/139256716