feat: support timezone on time scale charts#21475
feat: support timezone on time scale charts#21475freshollie wants to merge 1 commit intoapache:masterfrom
Conversation
|
Thanks for your contribution! Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only. |
|
Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the |
Ovilia
left a comment
There was a problem hiding this comment.
We are extremely cautious when it comes to introducing external libraries. Do you think there's a way to implement this feature without bringing in additional libraries? For instance, could we provide something like timezoneOffset (you can research how other software name similar elements).
Also, please introduce the newly added interfaces in the description of your Pull Request. Thanks!
|
Hi @Ovilia I’m happy to document the interface changes if you believe this is something you’d want in. Regarding the lib, @date-fns/tz is an extremely thin wrapper around the browser Intl.DateTimeFormat so in theory we could remove the lib by copying in the required source? |
Brief Information
This pull request is in the type of:
What does this PR do?
Supports formatting time axis with specific timezone. Very likely that this PR won't be merged since we are adding a new lib
@date-fns/tzhowever, I believe the authors should consider. Provided here incase others want to use :)Fixed issues
Details
Before: What was the problem?
Timezone on the time scale charts were only possible to set with
UTCor device local time. It wasn't possible to change this format outside the library because the axis tick intervals were lost. Doing this within the lib is very simple and the change is non breaking (unless you count the new lib as breaking)After: How does it behave after the fixing?
Document Info
One of the following should be checked.
Misc
Security Checking
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Merging options
Other information