1. 程式人生 > >echarts-去掉X軸 Y軸和網格線

echarts-去掉X軸 Y軸和網格線

去掉 axis 圖形 etop dom size and scrip uil

1、問題背景

如何在echarts中,去掉X軸、Y軸和網格線,只留數據圖形

2、實現源碼

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>echarts-去掉X軸、Y軸和網格線</title>
		<link rel="shortcut icon" href="../js/echarts-2.2.7/doc/asset/ico/favicon.png">
		<script type="text/javascript"
src="../js/echarts-2.2.7/doc/asset/js/jquery.min.js" >
</script> <script type="text/javascript" src="../js/echarts-2.2.7/doc/example/www2/js/echarts-all.js" ></script> <script> $(function(){ function randomDataArray() { var d = []; var arr = [3,5,7,9,10,1,2
,4,8,6]; var len = 10; for(var i=0;i<len;i++) { d.push([i+1,0,arr[i],]); } return d; } var chart = document.getElementById(‘chart‘); var echart = echarts.init(chart); var
option = { legend: { data:[‘scatter1‘], show:false }, textStyle:{ fontSize:16 }, xAxis : [ { type : ‘value‘, splitNumber: 2, scale: true, show:false, splitLine:{     show:false   } } ], yAxis : [ { type : ‘value‘, splitNumber: 2, scale: true, show:false, splitLine:{     show:false    } } ], series : [ { name:‘scatter1‘, type:‘scatter‘, symbol: ‘emptyCircle‘, symbolSize: 20, itemStyle : { normal: { label:{ show: true, position: ‘inside‘, textStyle : { fontSize : 24, fontFamily : ‘微軟雅黑‘, color:‘#FF0000‘ } } } }, data: randomDataArray() } ] }; echart.setOption(option); });
</script> </head> <body> <div id="chart" style="width: 1200px; height: 220px;"></div> </body> </html>

3、實現結果

技術分享圖片

再分享一下我老師大神的人工智能教程吧。零基礎!通俗易懂!風趣幽默!希望你也加入到我們人工智能的隊伍中來!https://www.cnblogs.com/captainbed

echarts-去掉X軸 Y軸和網格線