diff --git a/plot.ts b/plot.ts new file mode 100644 index 0000000..dd4430c --- /dev/null +++ b/plot.ts @@ -0,0 +1,9 @@ +import * as Plot from "npm:@observablehq/plot"; +import { DOMParser, SVGElement } from "npm:linkedom"; +export const document = new DOMParser().parseFromString( + ``, +); + +export const plot = (data) => { + return Plot.line(data, {x: "x", y: "y"}).plot({y: {grid: true}, document}) +} \ No newline at end of file