Skip to content

Instantly share code, notes, and snippets.

@texodus
Forked from JHawk/.block
Last active July 15, 2019 17:30
Show Gist options
  • Save texodus/372d406997d5522ebaafb17f0f521d97 to your computer and use it in GitHub Desktop.
Save texodus/372d406997d5522ebaafb17f0f521d97 to your computer and use it in GitHub Desktop.

Revisions

  1. texodus revised this gist Jul 15, 2019. 1 changed file with 0 additions and 0 deletions.
    Binary file modified superstore.arrow
    Binary file not shown.
  2. texodus revised this gist Jul 15, 2019. 2 changed files with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -3,15 +3,16 @@
    <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/@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="https://unpkg.com/@finos/perspective/dist/umd/perspective.js"></script>
    <script src="https://unpkg.com/@finos/perspective-viewer/dist/umd/perspective-viewer.js"></script>
    <script src="https://unpkg.com/@finos/perspective-viewer-hypergrid/dist/umd/perspective-viewer-hypergrid.js"></script>
    <script src="https://unpkg.com/@finos/perspective-viewer-d3fc/dist/umd/perspective-viewer-d3fc.js"></script>


    <script src="arrow.js"></script>

    <link rel='stylesheet' href="https://unpkg.com/@finos/perspective-viewer/build/material.css" is="custom-style">
    <link rel='stylesheet' href="https://unpkg.com/@finos/perspective-viewer/dist/umd/material.css" is="custom-style">
    <link rel='stylesheet' href="index.css">

    </head>
    Binary file modified superstore.arrow
    Binary file not shown.
  3. @JHawk JHawk revised this gist May 28, 2019. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion arrow.js
    Original 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', 'superstore.arrow', true);
    xhr.open('GET', ARROW, true);
    xhr.responseType = "arraybuffer"
    xhr.onload = function() {

  4. @JHawk JHawk revised this gist May 28, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion index.html
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@

    <body>

    <perspective-viewer view="sunburst" row-pivots='["Sub-Category","Region","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'>
    <perspective-viewer view="d3_sunburst" row-pivots='["Sub-Category","Region","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'>

    </perspective-viewer>

  5. @JHawk JHawk revised this gist May 28, 2019. 2 changed files with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -4,14 +4,14 @@

    <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="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="arrow.js"></script>

    <link rel='stylesheet' href="https://unpkg.com/@jpmorganchase/perspective-viewer/build/material.css" is="custom-style">
    <link rel='stylesheet' href="https://unpkg.com/@finos/perspective-viewer/build/material.css" is="custom-style">
    <link rel='stylesheet' href="index.css">

    </head>
    Binary file modified superstore.arrow
    Binary file not shown.
  6. @JHawk JHawk revised this gist Jan 28, 2019. 1 changed file with 0 additions and 0 deletions.
    Binary file removed superstore_data.arrow
    Binary file not shown.
  7. @JHawk JHawk revised this gist Jan 28, 2019. 2 changed files with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions arrow.js
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,19 @@
    window.addEventListener('WebComponentsReady', function() {

    // Fetch and load arrow data.
    var xhr = new XMLHttpRequest();
    xhr.open('GET', 'superstore_data.arrow', true);
    xhr.open('GET', 'superstore.arrow', true);
    xhr.responseType = "arraybuffer"
    xhr.onload = function() {

    // Get element from the DOM.
    var el = document.getElementsByTagName('perspective-viewer')[0];

    // Load the arrow response in the `<perspective-viewer>` DOM reference.
    el.load(xhr.response);

    // Toggle the config controls open.
    el.toggleConfig();
    }
    xhr.send(null);
    });
    });
    Binary file added superstore.arrow
    Binary file not shown.
  8. @JHawk JHawk revised this gist Jan 28, 2019. 2 changed files with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion arrow.js
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ window.addEventListener('WebComponentsReady', function() {

    // Fetch and load arrow data.
    var xhr = new XMLHttpRequest();
    xhr.open('GET', 'superstore.arrow', true);
    xhr.open('GET', 'superstore_data.arrow', true);
    xhr.responseType = "arraybuffer"
    xhr.onload = function() {

    Binary file renamed superstore.arrow → superstore_data.arrow
    Binary file not shown.
  9. @JHawk JHawk revised this gist Jan 28, 2019. 2 changed files with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    A static `superstore.arrow` demo.
    Binary file modified superstore.arrow
    Binary file not shown.
  10. @JHawk JHawk revised this gist Jan 28, 2019. 3 changed files with 9 additions and 1 deletion.
    7 changes: 7 additions & 0 deletions index.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    perspective-viewer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    }
    3 changes: 2 additions & 1 deletion index.html
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,8 @@

    <script src="arrow.js"></script>

    <link rel='stylesheet' href="https://unpkg.com/@jpmorganchase/perspective-viewer/build/material.css" is="custom-style">
    <link rel='stylesheet' href="https://unpkg.com/@jpmorganchase/perspective-viewer/build/material.css" is="custom-style">
    <link rel='stylesheet' href="index.css">

    </head>

    Binary file modified superstore.arrow
    Binary file not shown.
  11. @JHawk JHawk revised this gist Jan 28, 2019. 4 changed files with 8 additions and 4 deletions.
    8 changes: 8 additions & 0 deletions arrow.js
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,18 @@
    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 element from the DOM.
    var el = document.getElementsByTagName('perspective-viewer')[0];

    // Load the arrow response in the `<perspective-viewer>` DOM reference.
    el.load(xhr.response);

    // Toggle the config controls open.
    el.toggleConfig();
    }
    xhr.send(null);
    3 changes: 0 additions & 3 deletions index.css
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    .asdf {
    color: red;
    }
    1 change: 0 additions & 1 deletion index.html
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,6 @@
    <script src="arrow.js"></script>

    <link rel='stylesheet' href="https://unpkg.com/@jpmorganchase/perspective-viewer/build/material.css" is="custom-style">
    <link rel='stylesheet' href="index.css">

    </head>

    Binary file modified superstore.arrow
    Binary file not shown.
  12. @JHawk JHawk revised this gist Jan 28, 2019. 1 changed file with 0 additions and 0 deletions.
    Binary file modified superstore.arrow
    Binary file not shown.
  13. @JHawk JHawk revised this gist Jan 28, 2019. 1 changed file with 0 additions and 0 deletions.
    Binary file added superstore.arrow
    Binary file not shown.
  14. @JHawk JHawk revised this gist Jan 28, 2019. 2 changed files with 14 additions and 16 deletions.
    11 changes: 11 additions & 0 deletions arrow.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    window.addEventListener('WebComponentsReady', function() {
    var xhr = new XMLHttpRequest();
    xhr.open('GET', 'superstore.arrow', true);
    xhr.responseType = "arraybuffer"
    xhr.onload = function() {
    var el = document.getElementsByTagName('perspective-viewer')[0];
    el.load(xhr.response);
    el.toggleConfig();
    }
    xhr.send(null);
    });
    19 changes: 3 additions & 16 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -9,8 +9,9 @@
    <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>

    <link rel='stylesheet' href="https://unpkg.com/@jpmorganchase/perspective-viewer/build/material.css" is="custom-style">

    <script src="arrow.js"></script>

    <link rel='stylesheet' href="https://unpkg.com/@jpmorganchase/perspective-viewer/build/material.css" is="custom-style">
    <link rel='stylesheet' href="index.css">

    </head>
    @@ -21,20 +22,6 @@

    </perspective-viewer>

    <script>
    window.addEventListener('WebComponentsReady', function() {
    var xhr = new XMLHttpRequest();
    xhr.open('GET', 'superstore.arrow', true);
    xhr.responseType = "arraybuffer"
    xhr.onload = function() {
    var el = document.getElementsByTagName('perspective-viewer')[0];
    el.load(xhr.response);
    el.toggleConfig();
    }
    xhr.send(null);
    });
    </script>

    </body>

    </html>
  15. @JHawk JHawk revised this gist Jan 28, 2019. 2 changed files with 43 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions index.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    .asdf {
    color: red;
    }
    40 changes: 40 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    <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>

    <link rel='stylesheet' href="https://unpkg.com/@jpmorganchase/perspective-viewer/build/material.css" is="custom-style">

    <link rel='stylesheet' href="index.css">

    </head>

    <body>

    <perspective-viewer view="sunburst" row-pivots='["Sub-Category","Region","Segment"]' sort='[["Profit","desc"]]' columns='["Sales", "Profit"]'>

    </perspective-viewer>

    <script>
    window.addEventListener('WebComponentsReady', function() {
    var xhr = new XMLHttpRequest();
    xhr.open('GET', 'superstore.arrow', true);
    xhr.responseType = "arraybuffer"
    xhr.onload = function() {
    var el = document.getElementsByTagName('perspective-viewer')[0];
    el.load(xhr.response);
    el.toggleConfig();
    }
    xhr.send(null);
    });
    </script>

    </body>

    </html>
  16. @JHawk JHawk created this gist Jan 28, 2019.
    1 change: 1 addition & 0 deletions .block
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    license: apache-2.0