From c0b68bc795dba3d57ef8c6b56193ad6b12647823 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Thu, 14 Sep 2023 10:08:25 +0200 Subject: [PATCH] Various tests with Plot --- js/src/graph/TestGraph.js | 2 +- js/src/graph/export-package.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/src/graph/TestGraph.js b/js/src/graph/TestGraph.js index 850bef9..5236657 100644 --- a/js/src/graph/TestGraph.js +++ b/js/src/graph/TestGraph.js @@ -1,6 +1,6 @@ import * as Plot from "@observablehq/plot"; -export class TestGraph { +export default class TestGraph { init() { diff --git a/js/src/graph/export-package.js b/js/src/graph/export-package.js index f360084..ec8b4ee 100644 --- a/js/src/graph/export-package.js +++ b/js/src/graph/export-package.js @@ -1,5 +1,5 @@ import TestGraph from './TestGraph.js'; -import * as Plot from "@observablehq/plot"; +//import { rectY, binX } from "@observablehq/plot"; // PSEUDO PACKAGE if (typeof globalThis.argeo === 'undefined') @@ -12,8 +12,8 @@ if (typeof globalThis.argeo.app.graph === 'undefined') // PUBLIC CLASSES globalThis.argeo.app.graph.TestGraph = TestGraph; -const plot = Plot.rectY({ length: 10000 }, Plot.binX({ y: "count" }, { x: Math.random })).plot(); -const div = document.querySelector("#myplot"); -div.append(plot); +//const plot = rectY({ length: 10000 }, binX({ y: "count" }, { x: Math.random })).plot(); +//const div = document.querySelector("#myplot"); +//div.append(plot); "use strict"; -- 2.30.2