Skip to content

Commit

Permalink
Limit random sample of avatars to five people
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-r-bigelow committed Apr 3, 2024
1 parent 26c68d5 commit bec709c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/randomAvatars.ojs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function randomAvatars(teamName) {
(person) => person.id === id
)
)
.sort(() => 2 * Math.random() - 1);
.sort(() => 2 * Math.random() - 1)
.slice(0, 5);
const container = d3.create("div").classed("randomAvatars", true);
container
.selectAll("img")
Expand Down

0 comments on commit bec709c

Please sign in to comment.