Skip to content

Commit

Permalink
Ensure whole weeks are available on the scale when using them as inte…
Browse files Browse the repository at this point in the history
…rvals

Refs #31
  • Loading branch information
thewilkybarkid committed Jul 11, 2024
1 parent 53fb87a commit d3a886f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ function requestsByLanguageTimeline({ width } = {}) {
x: {
label: '',
domain: chosenYear
? [new Date(chosenYear, 0, 1, 0, 0, 0, 0), new Date(chosenYear + 1, 0, 1, 0, 0, 0, 0)]
? [
d3.utcSunday.floor(new Date(chosenYear, 0, 1, 0, 0, 0, 0)),
d3.utcSunday.ceil(new Date(chosenYear + 1, 0, 1, 0, 0, 0, 0)),
]
: [d3.utcSunday.floor(firstRequest), d3.utcSunday.ceil(now)],
},
marks: [
Expand Down
2 changes: 1 addition & 1 deletion src/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function usersTimeline({ width } = {}) {
d3.utcSunday.floor(new Date(chosenYear, 0, 1, 0, 0, 0, 0)),
d3.utcSunday.ceil(new Date(chosenYear + 1, 0, 1, 0, 0, 0, 0)),
]
: [d3.utcSunday.floor(firstUser), d3.utcSunday.ceil(now)],
: [d3.utcMonth.floor(firstUser), d3.utcMonth.ceil(now)],
},
marks: [
Plot.rectY(
Expand Down

0 comments on commit d3a886f

Please sign in to comment.