Charts ChartJS:完全不渲染时间序列

Charts ChartJS:完全不渲染时间序列,charts,momentjs,Charts,Momentjs,图表JS 3.0.0 图表根本不显示时间序列。 为了支持时间,我们需要时刻js,但在图表3.0中,即使添加时刻js,它也不起作用 以下是源代码: let ctx = document.querySelector("#progresschart").getContext('2d'); progresschart = new Chart(ctx, { // The type of chart we want to create type: 'line', /

图表JS 3.0.0 图表根本不显示时间序列。 为了支持时间,我们需要时刻js,但在图表3.0中,即使添加时刻js,它也不起作用 以下是源代码:

    let ctx = document.querySelector("#progresschart").getContext('2d');
progresschart = new Chart(ctx, {
  // The type of chart we want to create
  type: 'line',

  // The data for our dataset
  data: { datasets: datasetss },
  options: {
    scales: {
      xAxes: [{
        type: 'time',
      }]
    }
  }
})
这就是图表js呈现的方式:

此问题仅适用于chart js 3.0。
如果chart js 2.0版使用得很好。

您能导入一段工作代码吗?也许还有数据集?