Skip to content

skip intervals #1506

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

Merged
merged 6 commits into from
Apr 28, 2023
Merged

skip intervals #1506

merged 6 commits into from
Apr 28, 2023

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Apr 28, 2023

Fixes #1499. Also allows plural interval names such as years instead of requiring strictly year. Uses d3.unixDay instead of d3.utcDay for the day interval so that the intervals are uniformly spaced, matching the current behavior of d3.utcTicks.

Adding some unit tests for maybeTimeInterval and maybeUtcInterval would be nice…

@mbostock mbostock requested a review from Fil April 28, 2023 17:57
Copy link
Contributor

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions to better reflect the possibilities ("1 year" is supported, "2 quarters" is not).

I've added a tiny bit of documentation, but we'll have to restructure it anyways together with the new quantize transform #1497.

@mbostock
Copy link
Member Author

"2 quarters" is now supported.

@mbostock mbostock merged commit 09b8491 into main Apr 28, 2023
@mbostock mbostock deleted the mbostock/skip-intervals branch April 28, 2023 22:05
@mbostock mbostock mentioned this pull request Apr 28, 2023
7 tasks
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* skip intervals

* tiny bit of documentation

* Apply suggestions from code review

Co-authored-by: Philippe Rivière <[email protected]>

* prettier

* LiteralTimeInterval; 3 quarters

* test interval parsing

---------

Co-authored-by: Philippe Rivière <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interval multiples
2 participants