Introduce Observable Plot
[gpl/argeo-suite.git] / js / src / graph / TestGraph.js
diff --git a/js/src/graph/TestGraph.js b/js/src/graph/TestGraph.js
new file mode 100644 (file)
index 0000000..850bef9
--- /dev/null
@@ -0,0 +1,12 @@
+import * as Plot from "@observablehq/plot";
+
+export class TestGraph {
+
+       init() {
+
+               const plot = Plot.rectY({ length: 10000 }, Plot.binX({ y: "count" }, { x: Math.random })).plot();
+               const div = document.querySelector("#myplot");
+               div.append(plot);
+
+       }
+}