-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Fix data in financial sample #6244
Conversation
When unit is
|
Thanks for catching that @nagix. I've pushed a fix |
The array starts from Jan 2. I think the time between 0:00 and 9:30 needs to be skipped to 9:30 on the same day.
|
Thanks. Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is still incorrect when unit is 'day' (see Jan 6 and 7).
Array (60)
0 {t: "Mon Jan 01 1990 00:00:00 GMT+0800", y: "28.81"}
1 {t: "Tue Jan 02 1990 00:00:00 GMT+0800", y: "28.93"}
2 {t: "Wed Jan 03 1990 00:00:00 GMT+0800", y: "28.67"}
3 {t: "Thu Jan 04 1990 00:00:00 GMT+0800", y: "27.43"}
4 {t: "Fri Jan 05 1990 00:00:00 GMT+0800", y: "27.28"}
5 {t: "Sat Jan 06 1990 00:00:00 GMT+0800", y: "27.17"}
6 {t: "Sun Jan 07 1990 00:00:00 GMT+0800", y: "28.99"}
7 {t: "Mon Jan 08 1990 00:00:00 GMT+0800", y: "30.38"}
8 {t: "Tue Jan 09 1990 00:00:00 GMT+0800", y: "30.35"}
9 {t: "Wed Jan 10 1990 00:00:00 GMT+0800", y: "30.27"}
...
Yikes. I should have had a coffee yesterday. Thanks for the thorough testing. I've updated it as suggested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Do we really want to keep that sample in the core repository since now we have the |
On https://www.chartjs.org/samples/latest/ the link says "Time Series". I'm fine to rename the file to be |
+1 for |
The other thing we could do is place a note on the sample like:
If we add the note, I wonder if we'd still want to rename? The thing I like about the current file name is that it gives us a way to introduce additional time series samples. If it were named |
I like it |
I noticed while manually testing autoskip improvements that the financial sample is skipping 1993 and 1994 when unit is set to year because my code for generating sample dates was not too accurate.