plot.ts hinzugefügt

main
Alexander Kimmig 2025-06-03 00:02:39 +02:00
parent b0f1a49375
commit 715a3d0f4d
1 changed files with 9 additions and 0 deletions

9
plot.ts Normal file
View File

@ -0,0 +1,9 @@
import * as Plot from "npm:@observablehq/plot";
import { DOMParser, SVGElement } from "npm:linkedom";
export const document = new DOMParser().parseFromString(
`<!DOCTYPE html><html></html>`,
);
export const plot = (data) => {
return Plot.line(data, {x: "x", y: "y"}).plot({y: {grid: true}, document})
}