Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Time Cartesian Axis #32

Open
poulsenj opened this issue Dec 8, 2022 · 7 comments
Open

Support for Time Cartesian Axis #32

poulsenj opened this issue Dec 8, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@poulsenj
Copy link

poulsenj commented Dec 8, 2022

Feature request for handling of large data series where x value is a DateTime. Requires moment.js.
Example: https://codepen.io/toxy1337/pen/rQRqrw

@erossini erossini added the enhancement New feature or request label Dec 8, 2022
@erossini erossini self-assigned this Dec 13, 2022
@erossini
Copy link
Owner

Could you change your code using ChartJs 4.1.0 please?

@poulsenj
Copy link
Author

I added an example using Chart.js 4.1.0 ( and date.fns) here: https://codepen.io/poulsenj/pen/ZEjXNJm

@poulsenj
Copy link
Author

Added another Chart.js 4.1.0 example using Javascript dates instead of strings. You can then disable Chart.js parsing date strings and get better performance with large data sets. https://codepen.io/poulsenj/pen/vYaewQx

@erossini
Copy link
Owner

Good thank you. I'll have a look and let you know when the implementation is done.

@erossini
Copy link
Owner

Hey,
with the latest version of the component, now you can add time axis. Let me know if it is working for you.
Enrico

@poulsenj
Copy link
Author

poulsenj commented Apr 29, 2024 via email

@poulsenj
Copy link
Author

poulsenj commented May 1, 2024

I got it working by adding property AxesTime to class Models.Common.Axis and adding file wwwroot/lib/Chart.js/moment.js as the chartjs-adapter-moment.js is part of the package, but moment.js itself is not. So moment.js should either be packed as well or included in the users project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants