x軸設置如下、y軸同理
xAxis: { name: ' ', axisTick: { show: true //坐標軸刻度線 }, axisLine: { //軸線 show: false }, splitLine:{ //網格線 show:true }, axisLabel: { //坐標軸樣式 textStyle: { color: '#636363' } }},
效果圖:-------》》
順便來一下,柱狀圖顏色設置
series: [ { type: 'bar', encode: { // Map the "amount" column to X axis. x: 'amount', // Map the "product" column to Y axis y: 'product' }, itemStyle: { normal: { //這里是重點 color: function(params) { //注意,如果顏色太少的話,后面顏色不會自動循環,最好多定義幾個顏色 var colorList = ['#c23531','#2f4554', '#61a0a8', '#d48265', '#91c7ae','#749f83', '#ca8622']; return colorList[params.dataIndex] } } } } ]