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

No examples on how to use this adapter with 3.0.0-beta.3 #24

Open
esttenorio opened this issue Mar 4, 2021 · 3 comments
Open

No examples on how to use this adapter with 3.0.0-beta.3 #24

esttenorio opened this issue Mar 4, 2021 · 3 comments

Comments

@esttenorio
Copy link

There seems to be no documentation or examples on how to use this adapter with the latest charjs version.

@etimberg
Copy link
Member

etimberg commented Mar 4, 2021

There's a sample in the main chartjs repo. https://github.com/chartjs/Chart.js/blob/master/samples/scales/time/line.html

@esttenorio
Copy link
Author

esttenorio commented Mar 4, 2021

I'm trying to replicate this scenario below using 3.x.x since I need to use some specific plugins that need 3.x.x:

This example is using chartjs 2.7
https://stackoverflow.com/a/48143738/223851

The example in StackOverflow does not make use of labels as the example you pointed out, the labels are generated automatically. Using the example you shared, the behavior that I see is that the labels bypass any value of x passed in the Datapoint {x,y}.

Here's an example I built:
https://codepen.io/esttenorio/pen/OJbwmrL

Is the behavior shown on the Stackoverflow example supported in 3.x.x? Or am I missing some config?

I've tried instead of using x as a string, passing Date or Moment instead but none of them seems to work.

@etimberg
Copy link
Member

etimberg commented Mar 8, 2021

It should work just fine with x/y data https://codepen.io/etimberg/pen/LYbgPmj

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

No branches or pull requests

2 participants