+ ${this.plot.charts.map(
+ (chart) => html`
`,
+ )}
+
+ `;
+ }
+}
+
+declare global {
+ interface HTMLElementTagNameMap {
+ "kdb-chart-view": KdbChartView;
+ }
+}
diff --git a/src/webview/components/styles.ts b/src/webview/components/styles.ts
index f340968d..bc9630e0 100644
--- a/src/webview/components/styles.ts
+++ b/src/webview/components/styles.ts
@@ -133,6 +133,18 @@ export const dataSourceStyles = css`
}
`;
+export const chartStyles = css`
+ .frame {
+ width: 100vw;
+ height: 100vh;
+ }
+
+ .plot {
+ width: auto;
+ max-height: 100%;
+ }
+`;
+
export const vscodeStyles = css`
.dropdown-container {
box-sizing: border-box;
diff --git a/src/webview/main.ts b/src/webview/main.ts
index f98d874e..fa328308 100644
--- a/src/webview/main.ts
+++ b/src/webview/main.ts
@@ -32,5 +32,6 @@ import {
} from "@vscode/webview-ui-toolkit";
import "./components/kdbDataSourceView";
import "./components/kdbNewConnectionView";
+import "./components/kdbChartView";
provideVSCodeDesignSystem().register(allComponents);
diff --git a/test/suite/services.test.ts b/test/suite/services.test.ts
index 814c6322..07616dfd 100644
--- a/test/suite/services.test.ts
+++ b/test/suite/services.test.ts
@@ -53,10 +53,7 @@ import { LocalConnection } from "../../src/classes/localConnection";
import { Telemetry } from "../../src/utils/telemetryClient";
import { InsightsConnection } from "../../src/classes/insightsConnection";
import { DataSourceEditorProvider } from "../../src/services/dataSourceEditorProvider";
-import {
- WorkspaceTreeProvider,
- addWorkspaceFile,
-} from "../../src/services/workspaceTreeProvider";
+import { WorkspaceTreeProvider } from "../../src/services/workspaceTreeProvider";
import Path from "path";
import * as utils from "../../src/utils/getUri";
import { MetaInfoType, MetaObject } from "../../src/models/meta";
@@ -73,6 +70,7 @@ import * as coreUtils from "../../src/utils/core";
import { KdbTreeService } from "../../src/services/kdbTreeService";
import * as serverCommand from "../../src/commands/serverCommand";
import { ServerObject } from "../../src/models/serverObject";
+import { ChartEditorProvider } from "../../src/services/chartEditorProvider";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const codeFlow = require("../../src/services/kdbInsights/codeFlowLogin");
@@ -1804,37 +1802,37 @@ describe("connectionManagerService", () => {
});
});
-describe("dataSourceEditorProvider", () => {
- let context: ExtensionContext;
-
- function createPanel() {
- const listeners = {
- onDidReceiveMessage: undefined,
- postMessage: undefined,
- onDidChangeViewState: undefined,
- onDidDispose: undefined,
- };
- const panel =