1
我使用的是具有雙「y軸」並想旋轉其標籤的谷歌柱狀圖。我也嘗試hAxis:{slantedText: true}
,但不起作用,然而hAxis:{slantedText: true}
工作的地方有一個圖表y-axis
。如何在谷歌圖表中旋轉標籤?
這裏是我的代碼: -
var data = new google.visualization.arrayToDataTable(loadStageLeadGraphData);
var options = {
series: {
0: {
axis: 'distance'
}, // Bind series 0 to an axis named 'distance'.
1: {
axis: 'brightness'
} // Bind series 1 to an axis named 'brightness'.
},
chartArea: {
top: 55,
height: '40%'
},
axes: {
y: {
distance: {
label: 'Leads'
}, // Left y-axis.
brightness: {
side: 'right',
label: 'Value (INR)'
} // Right y-axis.
}
},
vAxis: { format: 'decimal' },
hAxis: {
slantedText: true,
},
colors: ['#CBD570', '#FCC100']
};
var chart = new google.charts.Bar(document.getElementById('Lead_stage'));
chart.draw(data, google.charts.Bar.convertOptions(options));
這是問題的圖像: -
但雙Y軸不受'材料'支持...... – user7104874
不確定我是否遵循評論 - 雙y軸__are ___由_Material_和_Core_圖表支持___,請參閱__EDIT__以上... – WhiteHat