[英]chart.js v2 - how to 'fill' the graph when using time scale
我用chart.js v2創建了一個圖表,並且我有一個很好的使用時間刻度軸的工作圖。 現在,我想在軸上顯示整個小時數,因此我將選項設置為:
xAxes: [{
type: 'time',
time: {
unit: 'hour',
unitStepSize: 1,
displayFormats: { 'hour': 'H:mm' }
}
}]
Codepen: http ://codepen.io/WilbertE/pen/wzRmWr
您要使用time
屬性的min
和max
屬性:
options: {
scales: {
xAxes: [{
type: "time",
time: {
min: /* Set your min here .. */,
max: /* .. and your max here*/
}
}]
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.