Closed vaibhav135 closed 2 years ago
Hello , did you find a solution ? Same problem with react here ( nextJs ) no TypeScript . Thanks @vaibhav135
@SSylvain1989 I think I didn't use it in the end, BTW if I may ask what kind of problem are you trying to solve.
Solve the problem by my self after all , i have ignored the warning , it work fine for me on chartjs 3.4.0
exemple below . Thanks
// import { Chart } from 'chart.js';
import 'chartjs-adapter-date-fns';
import { Line, defaults } from 'react-chartjs-2';
scales: {
x: {
type: 'time',
time: {
displayFormats: {
quarter: 'MMM YYYY',
},
},
Hii, I recently tried to install chartjs-adapter-date-fns using
npm install date-fns chartjs-adapter-date-fns --save
. But I am using React with typecript and it is giving me following error "Could not find declaration file for module". I tried to install the module with@types/
but the type version of the adapter is not available. Question: How do add this adapter to my .tsx file?