Skip to content

Commit 21bbc23

Browse files
authored
simplify the availability test (#2389)
1 parent 33a3ea1 commit 21bbc23

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

test/plots/availability.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,20 @@ import * as d3 from "d3";
33

44
export async function availability() {
55
const data = await d3.csv<any>("data/availability.csv", d3.autoType);
6-
const sum = (d) => (d.length ? d3.sum(d) : NaN); // force gaps
76
return Plot.plot({
87
height: 180,
98
marks: [
109
Plot.areaY(data, {
1110
x: "date",
1211
y: "value",
1312
interval: "day",
14-
reduce: sum,
1513
curve: "step",
1614
fill: "#f2f2fe"
1715
}),
1816
Plot.lineY(data, {
1917
x: "date",
2018
y: "value",
2119
interval: "day",
22-
reduce: sum,
2320
curve: "step"
2421
}),
2522
Plot.ruleY([0])

0 commit comments

Comments
 (0)