廈門區(qū)塊鏈網(wǎng)站開發(fā)網(wǎng)站排名快速提升工具
option = {series: [{type: 'gauge',min: 0,//最大值max: 100, //最小值startAngle: 200,//儀表盤起始角度。圓心 正右手側為0度,正上方為90度,正左手側為180度。endAngle: -20,//儀表盤結束角度splitNumber: 100, //儀表盤刻度的分割段數(shù)itemStyle: {color: '#58D9F9', //顏色shadowColor: 'rgba(0,138,255,0.45)',//陰影顏色shadowBlur: 10,//圖形陰影的模糊大小shadowOffsetX: 2,//陰影水平方向上的偏移距離shadowOffsetY: 2,//陰影垂直方向上的偏移距離},progress: {show: true, //是否顯示進度條roundCap: true,//是否在兩端顯示成圓形width: 18,//進度條寬度},pointer: {show:false,//是否顯示指針},axisLine: {show:true, //是否顯示儀表盤軸線roundCap: true, //是否在兩端顯示成圓形lineStyle: {width: 18,//軸線寬度}},axisTick: {show:false,//是否顯示刻度},splitLine: {show:false,//是否顯示分隔線},axisLabel: {show:false,//是否顯示標簽},title: {show: false,//是否顯示標題},detail: {show:true,//是否顯示詳情valueAnimation: true,//是否開啟標簽的數(shù)字動畫width: '60%',//詳情寬度lineHeight: 40,//行高borderRadius: 8, //文字塊的圓角offsetCenter: [0, '-5%'],//相對于儀表盤中心的偏移位置,數(shù)組第一項是水平方向的偏移,第二項是垂直方向的偏移??梢允墙^對的數(shù)值,也可以是相對于儀表盤半徑的百分比fontSize: 60,//文字的字體大小fontWeight: 'bolder',//文字字體的粗細formatter: '{value}/100',//格式化函數(shù)或者字符串color: 'auto',//文本顏色},data: [{value: 80}]}]
};
將精度條設為漸變色,中間富文本修改樣式:只需要修改(進度條progress、詳情detail)
progress: {show: true, //是否顯示進度條roundCap: true,//是否在兩端顯示成圓形width: 18,//進度條寬度itemStyle: {color: {type: 'linear',x: 0,y: 0,x2: 0,y2: 1,colorStops: [{offset: 0, color: '#4A9FFA' // 0% 處的顏色}, {offset: 1, color: '#47D6DE' // 100% 處的顏色}],global: false // 缺省為 false}}},detail: {show: true,//是否顯示詳情valueAnimation: true,//是否開啟標簽的數(shù)字動畫width: '60%',//詳情寬度lineHeight: 40,//行高borderRadius: 8, //文字塊的圓角offsetCenter: [0, '-10%'],//相對于儀表盤中心的偏移位置,數(shù)組第一項是水平方向的偏移,第二項是垂直方向的偏移??梢允墙^對的數(shù)值,也可以是相對于儀表盤半徑的百分比fontSize: 60,//文字的字體大小fontWeight: 'bolder',//文字字體的粗細formatter: '{a|{value}}{b|/100}',//格式化函數(shù)或者字符串color: 'auto',//文本顏色rich: {a: {align: 'center',color: '#3396FE',fontSize: 50,fontWeight: 'normal',//文字字體的粗細borderRadius: 8, //文字塊的圓角lineHeight: 40,//行高},b: {align: 'center',color: '#67788A',fontSize: 20,fontWeight: 'bolder',//文字字體的粗細borderRadius: 8, //文字塊的圓角lineHeight: 40,//行高},}},