9 lines
309 B
TypeScript
9 lines
309 B
TypeScript
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})
|
|
} |