import { parseHTML } from "https://esm.sh/linkedom@0.14.25"; import * as ObservablePlot from "https://esm.sh/@observablehq/plot@0.6.7"; // @ts-ignore: bad type const { document } = parseHTML(``); export const Plot: typeof ObservablePlot = { ...ObservablePlot, plot: (options?: ObservablePlot.PlotOptions) => { const elt = ObservablePlot.plot({ document, ...options }); elt.setAttribute("xmlns", "http://www.w3.org/2000/svg"); elt.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"); return elt.toString(); }, };