-
Notifications
You must be signed in to change notification settings - Fork 19.7k
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
[Feature] Time axis interval #17576
Comments
Sounds like a intuitionistic design. But there are two things we should always consider when designing this kind of domain-specific language:
|
@pissang Yes, I've considered about the second problem. Another option would be to use |
@Ovilia You think this feature will be available for the next version ? |
@StimioAnthonyLeRoy This feature may probably go with 5.5.0 because it's a major feature. And our next version 5.4.1 is scheduled at Novermber. So You may proabably wait until early 2023 for this feature. However, if it's OK to use nightly build, hopefully it can be ready by the end of next month. |
@Ovilia Data is in ISO format but depending on certain conditions, I need to display the axis labels in either YYYY-MM or YYY-MM-DD. Please confirm if this issue would be fixed in the next release 5.5.0 |
@pAfW001 Feb is not displayed because it overlapps with the previous labels. This is the expected behavior. |
@Ovilia Thank you for your reply! |
@pAfW001 Yes, this seems to be a bug. I will check this later when this PR is about to be finished. |
Hi guys!, Will it be available soon? And another question, is there any workaround how I could achieve same functionality right now? |
developers spending hours to set correct interval rules for time axes with current API |
Interval is not valid for time axis on V5. apache/echarts#17576
Interval is not valid for time axis on V5. apache/echarts#17576
@Ovilia |
What problem does this feature solve?
Since v5, the
interval
option of time axes is no long valid because the span of each two ticks are not always the same (e.g., Feburary has 28/29 days while March has 31 days). But it's a common requirement to set the interval level (or the minimium interval level) to be yearly/monthly/dayly/... and it can hardly be done with the current API.What does the proposed API look like?
I'd suggest we support
interval
,minInterval
, andmaxInterval
in the type ofTimeUnit
. If the developer want to set the interval to be 4 days,'4 days'
or'4 day'
is also valid.So, valid examples of
interval
s include:'year'
,'quarter'
,'4 days'
,'4 day'
,'30 minutes'
, and etc.For example, to display use ticks by month:
The ticks will be at the first date of each month (excluding the first one because it's displaying only because
showMinLabel: true
):minInterval
andmaxInterval
works similarly.Note that if
interval
is set to be like'4 days'
, the first day of each month may not be on ticks any more:In this case,
7/1
is not included in the ticks. #16335Related issues
The text was updated successfully, but these errors were encountered: