Skip to content

Commit

Permalink
adopt D3@7
Browse files Browse the repository at this point in the history
- d3/d3-scale#235 broke the caltrain test plot
  • Loading branch information
Fil committed Jun 17, 2021
1 parent 068f8d8 commit e9a24fc
Show file tree
Hide file tree
Showing 3 changed files with 229 additions and 210 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -48,7 +48,7 @@
"tape-await": "^0.1.2"
},
"dependencies": {
"d3": "^6.7.0",
"d3": "^7.0.0",
"isoformat": "^0.1.0"
}
}
6 changes: 3 additions & 3 deletions test/plots/caltrain.js
Expand Up @@ -27,21 +27,21 @@ export default async function() {
}),
Plot.text(new Set(caltrain.map(d => d.hours)), {
x: 0,
y: d => d,
y: d => +d,
text: d => `${(d - 1) % 12 + 1}${(d % 24) >= 12 ? "p": "a"}`
}),
Plot.text(caltrain, Plot.stackX2({
filter: d => d.orientation === "N",
x: () => 1,
y: "hours",
y: d => +d.hours,
text: d => d.minutes.padStart(2, "0"),
fill: "type",
textAnchor: "start"
})),
Plot.text(caltrain, Plot.stackX2({
filter: d => d.orientation === "S",
x: () => -1,
y: "hours",
y: d => +d.hours,
text: d => d.minutes.padStart(2, "0"),
fill: "type",
textAnchor: "end"
Expand Down

0 comments on commit e9a24fc

Please sign in to comment.