We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33a3ea1 commit 21bbc23Copy full SHA for 21bbc23
1 file changed
test/plots/availability.ts
@@ -3,23 +3,20 @@ import * as d3 from "d3";
3
4
export async function availability() {
5
const data = await d3.csv<any>("data/availability.csv", d3.autoType);
6
- const sum = (d) => (d.length ? d3.sum(d) : NaN); // force gaps
7
return Plot.plot({
8
height: 180,
9
marks: [
10
Plot.areaY(data, {
11
x: "date",
12
y: "value",
13
interval: "day",
14
- reduce: sum,
15
curve: "step",
16
fill: "#f2f2fe"
17
}),
18
Plot.lineY(data, {
19
20
21
22
23
curve: "step"
24
25
Plot.ruleY([0])
0 commit comments