Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for loading Apache Arrow data #11

Merged
merged 16 commits into from
Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add arrow example
  • Loading branch information
nmichaud committed Jan 22, 2018
commit 5d43c4dd72cbb46fc578b3b5f14e8f12a1aa7fa0
Binary file not shown.
54 changes: 54 additions & 0 deletions packages/perspective-examples/src/html/superstore-arrow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!--

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">

<script src="mobile_fix.js"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.24/webcomponents.min.js'></script>
<script src="perspective.view.js"></script>
<script src="hypergrid.plugin.js"></script>
<script src="highcharts.plugin.js"></script>

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

</head>
<body>

<perspective-viewer
binary="true"
view="vertical"
row-pivots='["Category","Region","Segment"]'
column-pivots='["Sub-Category"]'
columns='["Sales"]'
>

</perspective-viewer>

<script>

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

</script>

</body>
</html>