-
-
Notifications
You must be signed in to change notification settings - Fork 270
Date Adapters for Charts Not Working #315
-
I wrote a similar question on Stack Overflow but writing here both with updates and hopefully better insight:
• Setting the X or Y axis to type: time
throws an error that a complete date-adapter needs to be implemented.
• After testing chart.js
through react-chartjs-2
in a separate project sans CoreUI, creating the same config setup for the X-axis allowed the date-adapter to work.
• After checking the bundle file between the CoreUI project and react-chartjs-2, it appears that the node module never gets implemented to the page on the CoreUI side but does in the react-chartjs-2.
• My current hypothesis is that by using the React CoreUI template, which implements React.lazy()
and code-splitting methods, importing the chartjs-adapter-luxon
is dealing with an import issue. One, I could be wrong that it's specifically an issue with the CoreUI charts itself, and two, I could be wrong that it's an async-await/import function issue. Either way, I'm hoping there isn't a limitation with the adapters when using CoreUI.
• I've also tried the HTML CDN tags but no luck. My React project uses the CoreUI Pro Template and the Create-React-App setup.
Beta Was this translation helpful? Give feedback.
All reactions
After much study with ChartJS to see what was happening, it appears it is a CoreUI implementation issue. Both ChartJS and react-chartjs-2 implement the date adapters seamlessly.
Replies: 1 comment
-
After much study with ChartJS to see what was happening, it appears it is a CoreUI implementation issue. Both ChartJS and react-chartjs-2 implement the date adapters seamlessly.
Beta Was this translation helpful? Give feedback.