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

Add scrolling rendering of simple table. #1078

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
489 changes: 489 additions & 0 deletions dist/hot_renderers.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/hot_renderers.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/hot_renderers.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/hot_renderers.min.js.map

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions dist/pivot.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/pivot.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pivot.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pivot.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ <h3 align="center">Editable JSFiddles with Tips Dataset (<a href="http://nicolas
<h3 align="center">Basic examples</h3>
<ul>
<li><a href="simple.html">pivot()</a></li>
<li><a href="simple_hot.html">pivot() width scroll event</a></li>
<li><a href="simple_agg.html">pivot() with non-count aggregator</a></li>
<li><a href="simple_function.html">pivot() with function input</a></li>
<li><a href="scatter.html">pivot() with CSV input and chart output</a></li>
Expand Down
51 changes: 51 additions & 0 deletions examples/simple_hot.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>

<head>
<title>Pivot Demo</title>
<!-- external libs from cdnjs -->
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script> -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<!-- PivotTable.js libs from ../dist -->
<link rel="stylesheet" type="text/css" href="../dist/pivot.css">
<script type="text/javascript" src="../dist/pivot.js"></script>
<script type="text/javascript" src="../dist/hot_renderers.js"></script>
<style>
body {font-family: Verdana;}
</style>

<!-- for examples only! script to show code to user -->
<script type="text/javascript" src="show_code.js"></script>
</head>

<body>
<script type="text/javascript">
// This example is the most basic usage of pivot()

$(function () {
var utils = $.extend({}, $.pivotUtilities.hot_renderes);
var renderer = utils.renderer['Table'];
var aggregatorTemplate = $.pivotUtilities.aggregatorTemplates;
$.getJSON("mps.json", function (mps) {
$("#output").pivot(mps, {
cols: ['Gender'],
rows: ['Province', 'Party', 'Province', 'Age'],
aggregator: aggregatorTemplate.count()(["Age"]),
renderer: renderer,
colLimit: 10,
rowLimit: 10,
hot: true
});
});
});
</script>

<p><a href="index.html">&laquo; back to PivotTable.js examples</a></p>

<div id="output" style="margin: 30px;"></div>

</body>

</html>
Loading