Support for monthly time axis labels
See original GitHub issueWhat 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:
"data": [
["2019-01", "400"],
["2019-02", "500"],
["2019-05", "600"],
]
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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Support for monthly time axis labels · Issue #11997 - GitHub
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...
Read more >Stata Tip 55: Better Axis Labeling for Time Points and Time ...
The axis labels and the axis ticks need not correspond to each other, and it might be good to have fewer labels than...
Read more >Make axis labels to display on months in date time axis
In the HeatMap chart, using the showLabelOn property, it is possible to display the axis labels exactly on specific time intervals in date-time...
Read more >Change axis labels in a chart - Microsoft Support
Right-click the category labels you want to change, and click Select Data. Right-click the category axis and Select Data. In the Horizontal (Category)...
Read more >Organise X axis labels by month - regardl… - Apple Community
Make sure the date column is not a Header Column and insert a 2D Scatter instead of a 2D Line. Then set the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Month is not a fixed interval. using
category
will not work if we need an accurate axis.I’d suggest to add this kind of support or provide a way to customize the split behavior.
Hi, @maliayas
I’d suggest using
category
type axis. And fill the month missing data with value'-'