1
我的圖表位置有問題,我想從圖表開始到結束都將圖表放置爲100%。Google可視化圖表
我的代碼
test.controller('testCtrl', ['$scope', function ($scope) {
console.log('test chart');
var data = google.visualization.arrayToDataTable([
['Minute', 'A', 'B', 'C', 'D', 'E', 'F'],
['0 min', 0.72, 0.64, 0.55, 0.47, 0.68, 0.39],
['', 0.62, 0.69, 0.65, 0.51, 0.66, 0.37],
['45 min', 0.69, 0.51, 0.55, 0.43, 0.54, 0.44],
['', 0.79, 0.68, 0.70, 0.57, 0.59, 0.41],
['90 min', 0.66, 0.71, 0.66, 0.58, 0.63, 0.48]
]);
var options = {
width: '100%',
height: '100%',
curveType: 'function',
chartArea: {
width: '90%',
height: '80%'
},
legend: {
position: 'top'
}
};
var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));
chart.draw(data, options);
}]);
感謝您的幫助!
請將完整的代碼與HTML一起添加,最好用jsFiddle之類的代碼:https://jsfiddle.net/ – Sventies