Chart.js timescale: set min and max on xAxes

后端 未结 2 839
故里飘歌
故里飘歌 2021-01-01 23:35

How can I set a min and max on the xAxes? It works fine on the yAxes but on the xAxes it shows no behavior.

My xAxes

2条回答
  •  梦谈多话
    2021-01-02 00:21

    The properties you are looking for actually are in the time attribute :

    options: {
        scales: {
            xAxes: [{
                type: "time",
                time: {
                    min: 1471174953000,
                    max: 1473853353000
                }
            }]
        }
    }
    

提交回复
热议问题