1
我有用於註釋的列,但註釋不會出現在酒吧的頂部?如果var視圖顯示Label很重要?谷歌圖表標籤
google.load('visualization', '1.1', {'packages': ['bar']});
google.setOnLoadCallback(drawStuff);
function drawStuff() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Nescafe Instant');
data.addColumn({type: 'number', role: 'annotation'});
data.addColumn('number', 'Folgers Instant');
data.addColumn({type: 'number', role: 'annotation'})
data.addColumn('number', 'Nescafe Beans');
data.addColumn({type: 'number', role: 'annotation'})
data.addRows([
['2001', 321, 150, 621, 500, 600, 816],
['2002', 163, 150, 231, 500, 600, 539]
]);
var options = {
width: 800,
height: 600,
chart: {
title: 'Year-by-year coffee consumption',
subtitle: 'This data is not real'
},
vAxis: {
viewWindow: {
min: 0,
max: 1500
}
},
chartArea: { backgroundColor: '#F8F8F8' }
};
var chart = new google.charts.Bar(document.getElementById('chart_div'));
chart.draw(data, google.charts.Bar.convertOptions(options));
};
感謝, peXeq