我創建了使用谷歌的可視化,但無法獲得第二列谷歌圖
var data = google.visualization.arrayToDataTable([
['Year', 'Sales', 'Expenses'],
['2004', 1000, 400],
['2005', 1170, 460],
['2006', 660, 1120],
['2007', 1030, 540]
]);
var view = new google.visualization.DataView(data);
view.setColumns([0, 1,{
calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation"
},
2]);
var options = {
title: 'Company Performance',
hAxis: { title: 'Users', titleTextStyle: { color: 'red', fontSize: 16} },
legend: { position: 'bottom', textStyle: { color: 'blue', fontSize: 16} }
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(view, options);
的數據值來對銷售數據值的圖表,但不是費用列顯示數據值的柱形圖
感謝您的回覆 – user1197037