echarts 儀表盤設置

var myChart = echarts.init(document.getElementById('echarts1'));
		option = {
		    series: [
		        {
		            type: 'gauge',
		            radius: "110",
		            data: [{value: 28000, name: '日均在線'}],
		            axisLine : {
		            	lineStyle : {
		            		color : [[1,"orange"]], //儀表盤顏色
		            		width : 15
		            	}
		            },
		            axisTick : {//刻度線
				    	show : false
				    },
				    axisLabel: {//刻度標籤
				    	show: false
				    },
				    splitLine: {//分割線
				    	show: false
				    },
		            pointer: {//指針
		            	show: false
		            },
				    detail: { // 儀表盤詳情
				    	show: true, 
				    	offsetCenter: [0,0],
				    	color: "auto", 
				    	fontSize: 30, 
				    	formatter: "{value}"
				    },
				    title: { // 儀表盤標題。 
				    	show: true, 
				    	offsetCenter: [0,"50%"], 
				    	fontSize: 15,
				    	color : "#b2b1b1"
				    }
				    	
		        }
		    ]
		};
        myChart.setOption(option);

 效果圖

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章