ECharts顏色漸變、Y軸文字左對齊
阿新 • • 發佈:2019-01-02
Echarts柱狀圖、條形圖,Y軸文字左對齊--如圖
option = { title: { text: 'Y軸文字左對齊', left:'center', textStyle:{ color:'#0371f9', fontStyle:'normal', fontWeight:'normal', fontFamily:'微軟雅黑', fontSize:18 } }, grid: { left: '-0%', right: '25', bottom: '3%', top:'62', containLabel: true }, xAxis : [ { min: 0, max: 500, interval: 100, type: 'value', splitLine : { lineStyle: { type: 'dashed', color:'#3d5384' } }, } ], yAxis : [ { nameTextStyle:{ fontSize:14 }, axisLabel:{ interval:0, margin:95, textStyle: { align:'left', baseline:'middle' } }, type : 'category', data : ['保險業','服裝業','體育運動','郵政快遞運輸業','住宿和餐飲業','金融業'], x: 50, y: 20 } ], series : [ { barWidth : '35%', name:'數量', type:'bar', data:['100','150','320','353','365','104'], } ] };