我升级到最新的 Chart.JS 版本 3.0.2。我正在尝试获取要呈现的时间序列图。这是我的配置:
{
type: 'line',
data: {
datasets: [{
data: dataForChart
}]
},
options: {
scales: {
x: {
type: 'time'
}
}
}
}
我已经像这样导入了模块:
import ChartJS from 'chart.js/auto';
我得到的错误是:
Error: This method is not implemented: either no adapter can be found or an incomplete integration was provided.
关于我可能做错的任何提示?
这是一个存在该问题的代码沙箱:https ://codesandbox.io/s/throbbing-cdn-j6q2u?file=/src/App.js