-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
resize.html
40 lines (31 loc) · 1.22 KB
/
resize.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!--
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.
-->
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
<script src="lumino.js"></script>
<script src="perspective.js"></script>
<script src="perspective-viewer-datagrid.js"></script>
<link rel='stylesheet' href="demo.css">
</head>
<body>
<div id="container"></div>
<script>
(async () => {
const req = await fetch("superstore.csv");
const csv = await req.text();
window.__WIDGET__ = new PerspectiveLumino.PerspectiveWidget();
document.getElementById("container").appendChild(window.__WIDGET__.node);
const worker = perspective.worker();
const table = await worker.table(csv);
window.__WIDGET__.load(table);
window.__WIDGET__.plugin = "datagrid";
console.log(window.__WIDGET__);
})();
</script>
</body>
</html>