-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Add in localization for datetime with override option for datetime and numbers #985
base: master
Are you sure you want to change the base?
Conversation
hey @willfarrell thanks for the PR :) since this introduces many breaking changes, i will not be able to merge it into any v1.x release in its current form. perhaps it is possible to implement this as an additionally supported formatting strategy rather than breaking existing templates? this PR changes the behavior of many demos, for example https://leeoniya.github.io/uPlot/demos/timezones-dst.html no longer shows hours/minutes in the legend, which is the main purpose of that demo. this is more difficult for me to read than what currently exists. it also greatly increases the risk of overlapping tick labels: vs also, i don't think this PR addresses the concern raised in #474 of being unable to insert line breaks into the tick strings? anyways, this is a good starting point for something that might evolve into something real. 👍 |
Yes, this is a starting point, but wanted to make sure it was shared early. Sorry, should have converted to a draft. Agreed, I used the
I looked into this initially, but couldn't figure out how to override the existing
I'll reread in detail, must have missed that. Was kinda focused on my own use case and saw it has a lot of overlap. |
PR is updated to support multi-line date/times and localized legend date-time. Notable differences (en-us) at lower zoom levels:
Did some testing with a bunch of locale, using https://en.wikipedia.org/wiki/List_of_date_formats_by_country seems to look good. Update; Add in hourCycle option to better support countries that allow both h12 & h24 https://en.wikipedia.org/wiki/Date_and_time_representation_by_country. ie in CA engligh formats to h12, when french formats to h24. This option will allow consistency multi language countries. |
# Conflicts: # dist/uPlot.cjs.js # dist/uPlot.esm.js # dist/uPlot.iife.js # dist/uPlot.iife.min.js
Features:
Breaking changes:
Notes:
Closes #474