我正在使用Google圖表燭臺圖表(側向翻轉)來模擬範圍條形圖。關於當前顯示在最左邊的行(TU300,TU-01,TU-10等)中的文本 - 我希望它也可以立即顯示在每個單槓的右側,以便更有效地標記每個欄。向Google燭臺圖表添加註釋
我是一個新手,並希望得到詳細的幫助。這裏的的jsfiddle:
https://jsfiddle.net/jdscomms/xLe83g80/
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.arrayToDataTable([
['TU300', 438, 438, 447, 447],
['TU-01', null, null, null, null],
['TU-10', 436, 436, 445, 445],
['TU-12EX', 438, 438, 445, 445],
['TU-2', 438, 438, 445, 445],
['TU-3', 436, 436, 445, 445],
['TU-3s', 436, 436, 445, 445],
[' TU-3w', 436, 436, 445, 445],
['NS Micro', 435, 435, 445, 445],
['NS Micro II', 410, 410, 480, 480],
['Universal II ', 435, 435, 445, 445],
], true);
var options = {
title: 'Calibration range',
orientation: 'vertical', // Orients this chart horizontally
backgroundColor: '#eaeaea',
hAxis: {
title: 'Hz',
minValue: 300,
maxValue: 600,
gridlines: { color: '#999', count: 21 },
minorGridlines: { color: '#e1e1e1', count: 4 },
},
vAxis: {
title: 'Models',
},
bar: { groupWidth: '80%' }, // Space between bars
candlestick: {
fallingColor: { strokeWidth: 0, fill: '#a52714' }, // red
risingColor: { strokeWidth: 0, fill: '#0f9d58' } // green
}
};
var chart = new google.visualization.CandlestickChart(document.getElementById('chart_div'));
chart.draw(data, options);
}