-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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 monthly time axis labels #11997
Comments
Hi! We've received your issue and please be patient to get responded. 🎉 In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer. If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions. If you are interested in the project, you may also subscribe our mail list. Have a nice day! 🍵 |
Hi, @maliayas I'd suggest using |
I'll think about that as a workaround, thanks. You may prefer to keep the issue open for future work. |
Hi, I agree to @xiaoyvr , this functionality is quite commonly required. Can this ticket be reopened? |
Hi, we've refactored our time axis in 5.0. We will keep this issue open, please let us know if there are other problems. |
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue. |
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks! |
What problem does this feature solve?
When I create a time axis which the values are on a monthly basis, echarts creates labels in Y-M-D format, which I'd expect Y-M format. See this JSFiddle: https://jsfiddle.net/up0hq4zL/
Data is like:
And the outcome is:
And this is the proposed look:
Normally I could make this happen using the
xAxis.axisLabel.formatter
function; however the timestamps it receives don't correspond to the first day of each month. For example it receives a timestamp for "2019-03-25" which I wouldn't format as YEAR-MONTH because that would mislocate March tick on the x axis because you'd think a tick would mark the beginning of the month.The text was updated successfully, but these errors were encountered: