echars3.0 x軸文字怎么讓它全部顯示出來,這個是測試提出來的bug,然后就沒然后了,找了幾種解決方案,大體思路就是,1看看能不能都顯示出來,樣式問題后面解決 2.文字呈現斜放,以前也是這么玩的 3.看看可以有其他更好的方案不呢?
原文地址:http://blog.csdn.net/wu920604/article/details/53332520
先上實現了的效果圖:實現的核心代碼已經標紅
xAxis: [ { type: 'category', data: sourceName, axisTick: { alignWithLabel: true }, axisLabel: { interval:0, rotate:20//角度順時針計算的 } } ],
xAxis: [ { type: 'category', data: topicName, axisTick: { alignWithLabel: true }, axisLabel: { interval: 0, formatter:function(value,index) { if (index % 2 !== 0) { return '\n\n' + value; } else { return value; } } } } ],