Chartjs linechart with only one point - how to center

后端 未结 4 1193
一整个雨季
一整个雨季 2020-12-19 01:45

I have a chartjs linechart diagram to show the sales of different products on a range of dates. The user can select a date range (for example from 2015-12-01 to 2015-12-10)

4条回答
  •  半阙折子戏
    2020-12-19 02:12

    Instead of hardcoding the labels and values with blank parameters use offset property inside scale under options. scales: { xAxes: [{ offset:true, }} }

提交回复
热议问题