-
Notifications
You must be signed in to change notification settings - Fork 185
default multi-line time format #1718
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
Conversation
75a2dd2
to
1a05337
Compare
throw new Error("unable to format time ticks"); | ||
} | ||
|
||
function getTimeTicksInterval(scale, ticks) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function being a bit difficult to grokk, I've made a chart to understand at which exact values the transitions happen; e.g., 707ms—the geometric mean of 500ms and 1000ms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s gotta match the behavior of d3.utcTicks.
Co-authored-by: Philippe Rivière <[email protected]>
52556e2
to
d689f98
Compare
Probably not needed now that observablehq#1285 was closed by observablehq#1718
* document multi-line tick format (ref: #1718, #1725) * Update docs/marks/axis.md Co-authored-by: Mike Bostock <[email protected]> * better formats for explicit intervals --------- Co-authored-by: Mike Bostock <[email protected]>
* remove maybeAutoTickFormat * multi-line time format * Update test/plots/covid-ihme-projected-deaths.ts Co-authored-by: Philippe Rivière <[email protected]> * link to d3-time * fix test size --------- Co-authored-by: Philippe Rivière <[email protected]>
* document multi-line tick format (ref: #1718, #1725) * Update docs/marks/axis.md Co-authored-by: Mike Bostock <[email protected]> * better formats for explicit intervals --------- Co-authored-by: Mike Bostock <[email protected]>
* remove maybeAutoTickFormat * multi-line time format * Update test/plots/covid-ihme-projected-deaths.ts Co-authored-by: Philippe Rivière <[email protected]> * link to d3-time * fix test size --------- Co-authored-by: Philippe Rivière <[email protected]>
Probably not needed now that observablehq#1285 was closed by observablehq#1718
…ervablehq#1728) * document multi-line tick format (ref: observablehq#1718, observablehq#1725) * Update docs/marks/axis.md Co-authored-by: Mike Bostock <[email protected]> * better formats for explicit intervals --------- Co-authored-by: Mike Bostock <[email protected]>
Fixes #1285.
TODO
It would also be nice to have a better format for explicit tick time intervals #932, but I’ve left that for future work.