1
顯示鋸齒狀標籤我在谷歌圖表顯示中的問題,在x軸,所述標籤是顯示在Z字形這樣谷歌圖表在x軸
。
我想它這樣
var data = new google.visualization.DataTable();
data.addColumn('string','Mois');
data.addColumn('number', 'Depense');
data.addColumn('number', 'Depasse');
new google.visualization.ColumnChart(document
.getElementById('visualizationNatM'))
.draw(data, {
width:viewport.width,
height : viewport.height - 400,
isStacked : true,
legend : {
position : 'none'
},
sortData: false,
hAxis : {
gridlines : {
count : 12
}
},
colors : [ '#a8cf04', '#d44c33' ],
backgroundColor : '#FFFFFF',
chartArea : {
left : 70
}
});
任何一個有解決這個問題呢?
謝謝您的答覆,我修改了像你提到,但低於個月(J,S,N,J,M,M)是不顯示 –
您可能還需要設置'hAxis.showTextEvery'和'hAxis.minTextSpacing'選項。查看更新的答案。還有一些其他的'hAxis' [選項](https://developers.google.com/chart/interactive/docs/gallery/columnchart#Configuration_Options)可能會對您有用,也可能不會對您有用。 – asgallant
謝謝你解決了這個問題 –