Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions test/plots/availability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,20 @@ import * as d3 from "d3";

export async function availability() {
const data = await d3.csv<any>("data/availability.csv", d3.autoType);
const sum = (d) => (d.length ? d3.sum(d) : NaN); // force gaps
return Plot.plot({
height: 180,
marks: [
Plot.areaY(data, {
x: "date",
y: "value",
interval: "day",
reduce: sum,
curve: "step",
fill: "#f2f2fe"
}),
Plot.lineY(data, {
x: "date",
y: "value",
interval: "day",
reduce: sum,
curve: "step"
}),
Plot.ruleY([0])
Expand Down
Loading