{
const yAxis = Plot.plot({
width: 40,
height,
marginTop,
marginBottom,
y: yScale
});
const chart = Plot.plot({
width: width * 2,
height,
marginTop,
marginBottom,
marginLeft: 10,
x: { nice: true },
y: yScale,
marks: [
Plot.ruleY([0], { stroke: "#888" }),
Plot.lineY(sweep, { x: "t", y: "y", stroke: "#338" })
]
});
chart.classList.add("chart");
const scrollbar = html`<div class="scrollbar">`;
scrollbar.append(chart);
const div = html`<div class="container">`;
div.append(yAxis, scrollbar);
return div;
}