forked from finos/perspective
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
24 lines (22 loc) · 770 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/******************************************************************************
*
* Copyright (c) 2017, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
import perspective from "@finos/perspective";
import "./index.css";
import "@finos/perspective-viewer";
import "@finos/perspective-viewer-datagrid";
import "@finos/perspective-viewer-d3fc";
window.addEventListener("WebComponentsReady", () => {
const worker = perspective.worker();
const table = worker.table([
{x: 1, y: 2},
{x: 2, y: 2}
]);
const elem = document.getElementsByTagName("perspective-viewer")[0];
elem.load(table);
});