4
我想問一下,如果有辦法將圖表推向右側,那麼就不會有任何空閒空間。我附上簡單的圖像,紅線顯示,這個空間也應該由圖表填充。Chart.js和右側空閒空間
的,這是我javsacript代碼:
var lineChartData = {
labels : ["January","February","March","April"],
datasets : [
{
label: "Dataset",
pointHighlightStroke : "rgba(220,220,220,1)",
data : [0,3,4,11]
}
]
};
window.onload = function(){
var ctx = document.getElementById("canvas").getContext("2d");
window.myLine = new Chart(ctx).Line(lineChartData, {
responsive: true,
scaleOverride: true,
scaleSteps: Math.ceil((max-start)/step),
scaleStepWidth: step,
pointDot : false,
});
}
好的,完整的答案。謝謝。 – user3573535
所以沒有辦法在X軸上顯示標籤,只是讓它們在末端/右側被裁剪/裁剪? – SISYN