Last active
July 15, 2019 16:45
-
-
Save JHawk/9b20383f042853f27c6e720baf4a19db to your computer and use it in GitHub Desktop.
Revisions
-
JHawk revised this gist
May 28, 2019 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,23 +5,23 @@ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <script src="https://unpkg.com/@finos/perspective/build/perspective.js"></script> <script src="https://unpkg.com/@finos/perspective-viewer/build/perspective.view.js"></script> <script src="https://unpkg.com/@finos/perspective-viewer-hypergrid/build/hypergrid.plugin.js"></script> <script src="https://unpkg.com/@finos/perspective-viewer-d3fc/build/d3fc.plugin.js"></script> <script src="example.js"></script> <link rel='stylesheet' href="index.css"> <link rel='stylesheet' href="https://unpkg.com/@finos/perspective-viewer/build/material.css" is="custom-style"> </head> <body> <div id="grid"> <perspective-viewer row-pivots='["Region","State","City"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'></perspective-viewer> <perspective-viewer view="d3_sunburst" row-pivots='["Category","Sub-Category","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'></perspective-viewer> </div> </body> -
JHawk revised this gist
Apr 15, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -20,8 +20,8 @@ <body> <div id="grid"> <perspective-viewer row-pivots='["Region","State","City"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'></perspective-viewer> <perspective-viewer view="sunburst" row-pivots='["Category","Sub-Category","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'></perspective-viewer> </div> </body> -
JHawk revised this gist
Apr 15, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1,2 @@ license: apache-2.0 height: 1200 -
JHawk revised this gist
Apr 15, 2019 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,10 @@ const ARROW = "https://unpkg.com/@jpmorganchase/perspective-examples/build/superstore.arrow"; window.addEventListener('WebComponentsReady', function() { // Fetch and load arrow data. var xhr = new XMLHttpRequest(); xhr.open('GET', ARROW, true); xhr.responseType = "arraybuffer" xhr.onload = function() { -
JHawk revised this gist
Apr 15, 2019 . 2 changed files with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ A demo of linked `<perspective-viewer>`s using `superstore.arrow`. Binary file not shown. -
JHawk revised this gist
Apr 15, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
Binary file not shown. -
JHawk revised this gist
Apr 15, 2019 . 4 changed files with 73 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ A demo of linked `<perspective-viewer>`'s using `superstore.arrow`. This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ window.addEventListener('WebComponentsReady', function() { // Fetch and load arrow data. var xhr = new XMLHttpRequest(); xhr.open('GET', 'superstore.arrow', true); xhr.responseType = "arraybuffer" xhr.onload = function() { // Get `<perspective-viewer>`s from the DOM. var el1 = document.getElementsByTagName('perspective-viewer')[0]; var el2 = document.getElementsByTagName('perspective-viewer')[1]; // Create a `table()` using the arrow response. var table = perspective.shared_worker().table(xhr.response); // Load the table in each of the `<perspective-viewer>`s DOM reference. el1.load(table); el2.load(table); // Add an event listener to the first `<perspective-viewer>`. el1.addEventListener("perspective-click", e => { // Update the second `<perspective-viewer>`, filtering to the row // clicked on in the first `<perspective-viewer>`. el2.restore(e.detail.config) }); } xhr.send(null); }); This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,14 @@ #grid { display: flex; max-width: 600px; max-height: 1200px; margin: auto; flex-direction: column; } #grid perspective-viewer { height: 600px; width: 600px; flex: 1; display: block; } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <script src="https://unpkg.com/@jpmorganchase/perspective/build/perspective.js"></script> <script src="https://unpkg.com/@jpmorganchase/perspective-viewer/build/perspective.view.js"></script> <script src="https://unpkg.com/@jpmorganchase/perspective-viewer-hypergrid/build/hypergrid.plugin.js"></script> <script src="https://unpkg.com/@jpmorganchase/perspective-viewer-highcharts/build/highcharts.plugin.js"></script> <script src="example.js"></script> <link rel='stylesheet' href="index.css"> <link rel='stylesheet' href="https://unpkg.com/@jpmorganchase/perspective-viewer/build/material.css" is="custom-style"> </head> <body> <div id="grid"> <perspective-viewer row-pivots='["Sub-Category","Region","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'></perspective-viewer> <perspective-viewer view="sunburst" row-pivots='["Sub-Category","Region","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'></perspective-viewer> </div> </body> </html> -
JHawk created this gist
Apr 15, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ license: apache-2.0 This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ perspective-viewer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }