-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
345 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- | ||
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> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" /> | ||
|
||
<script type="module" src="node_modules/@finos/perspective-viewer/dist/cdn/perspective-viewer.js"></script> | ||
<script type="module" src="node_modules/@finos/perspective-viewer-datagrid/dist/cdn/perspective-viewer-datagrid.js"></script> | ||
<script type="module" src="node_modules/@finos/perspective-viewer-d3fc/dist/cdn/perspective-viewer-d3fc.js"></script> | ||
|
||
<link rel="stylesheet" crossorigin="anonymous" href="/node_modules/@finos/perspective-viewer/dist/css/themes.css" /> | ||
|
||
<style> | ||
perspective-viewer { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<perspective-viewer></perspective-viewer> | ||
|
||
<script type="module"> | ||
import perspective from "/node_modules/@finos/perspective/dist/cdn/perspective.js"; | ||
window.addEventListener("DOMContentLoaded", async () => { | ||
const el = document.getElementsByTagName("perspective-viewer")[0]; | ||
el.addEventListener("perspective-config-update", async () => localStorage.setItem("layout", JSON.stringify(await el.save()))); | ||
const req = await fetch("benchmark-python.arrow"); | ||
const arrow = await req.arrayBuffer(); | ||
const worker = perspective.worker(); | ||
const table = await worker.table(arrow); | ||
el.load(table); | ||
el.restore(JSON.parse(localStorage.getItem("layout"))); | ||
el.toggleConfig(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.