I'm using chart.js wrapped in an angular module (I'm using PrimeNG's ChartModule).
Now I'd like to use the chartjs-adapter-luxon. I added luxon and chartjs-adapter-luxon to my package.json.
What else do I need to do, so that chart.js recognizes the date adapter?
I tried adding "node_modules/luxon/build/es6/luxon.js" and "node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.js" to the list of scripts in angular.json, but still no luck.
I'm using chart.js wrapped in an angular module (I'm using PrimeNG's
ChartModule
).Now I'd like to use the
chartjs-adapter-luxon
. I addedluxon
andchartjs-adapter-luxon
to my package.json. What else do I need to do, so that chart.js recognizes the date adapter?I tried adding "node_modules/luxon/build/es6/luxon.js" and "node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.js" to the list of scripts in angular.json, but still no luck.
Here is a minimal example to reproduce the problem: https://stackblitz.com/edit/angular-ivy-wp9ejg?file=src/app/app.component.ts When changing the type of the x scale to 'time' on app.component.ts:23, the problem with the missing adapter can be reproduced.