Skip to content

skip intervals#1506

Merged
mbostock merged 6 commits into
mainfrom
mbostock/skip-intervals
Apr 28, 2023
Merged

skip intervals#1506
mbostock merged 6 commits into
mainfrom
mbostock/skip-intervals

Conversation

@mbostock
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread src/interval.d.ts Outdated
Comment thread test/plots/aapl-bollinger.ts Outdated
Comment thread src/interval.d.ts Outdated
Comment thread src/interval.d.ts Outdated
Comment thread src/time.js
mbostock and others added 3 commits April 28, 2023 16:45
@mbostock
Copy link
Copy Markdown
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 <fil@rezo.net>

* prettier

* LiteralTimeInterval; 3 quarters

* test interval parsing

---------

Co-authored-by: Philippe Rivière <fil@rezo.net>
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