I have a question about using Observable JS functions in quarto documents. I have been looking at the Observables website for examples, but I am having trouble getting some of them to run in a quarto doc (as opposed to in an Observerables notebook). It sounds like it should be possible, but in this small example I am getting an error TypeError: Plot.pointerX is not a function
:
Plot.plot({
height: 160,
y: {axis: "right", grid: true, nice: true},
marks: [
Plot.lineY(aapl, {x: "Date", y: "Close", fy: d => (d.Close % 2) === 0}),
Plot.ruleX(aapl, Plot.pointerX({x: "Date", py: "Close", fy: d => (d.Close % 2) === 0, stroke: "red"})),
Plot.dot(aapl, Plot.pointerX({x: "Date", y: "Close", stroke: "red"})),
Plot.text(aapl, Plot.pointerX({px: "Date", py: "Close", dy: -17, frameAnchor: "top-left", fontVariant: "tabular-nums", text: (d) => [`Date ${Plot.formatIsoDate(d.Date)}`, `Close ${d.Close.toFixed(2)}`].join(" ")}))
]
})
Does anyone know how to make this example work?