postrest 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app.rb +1 -1
- data/public/index.htm +116 -0
- data/public/node_modules/pivottable/CONTRIBUTING.md +19 -0
- data/public/node_modules/pivottable/LICENSE.md +9 -0
- data/public/node_modules/pivottable/ReadMe.md +155 -0
- data/public/node_modules/pivottable/bower.json +31 -0
- data/public/node_modules/pivottable/c3_renderers.coffee +155 -0
- data/public/node_modules/pivottable/d3_renderers.coffee +73 -0
- data/public/node_modules/pivottable/dist/c3_renderers.js +256 -0
- data/public/node_modules/pivottable/dist/c3_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/c3_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/c3_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/d3_renderers.js +105 -0
- data/public/node_modules/pivottable/dist/d3_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/d3_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/d3_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/export_renderers.js +80 -0
- data/public/node_modules/pivottable/dist/export_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/export_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/export_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.js +183 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.css +97 -0
- data/public/node_modules/pivottable/dist/pivot.es.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.es.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.es.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.es.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.fr.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.fr.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.fr.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.fr.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.js +1511 -0
- data/public/node_modules/pivottable/dist/pivot.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.min.css +1 -0
- data/public/node_modules/pivottable/dist/pivot.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.nl.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.nl.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.nl.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.nl.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.pt.js +104 -0
- data/public/node_modules/pivottable/dist/pivot.pt.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.pt.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.pt.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.ru.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.ru.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.ru.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.ru.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.tr.js +104 -0
- data/public/node_modules/pivottable/dist/pivot.tr.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.tr.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.tr.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/tips_data.min.js +247 -0
- data/public/node_modules/pivottable/examples/c3.html +61 -0
- data/public/node_modules/pivottable/examples/d3.html +49 -0
- data/public/node_modules/pivottable/examples/fully_loaded.html +80 -0
- data/public/node_modules/pivottable/examples/gchart.html +53 -0
- data/public/node_modules/pivottable/examples/gh-fork-ribbon.css +140 -0
- data/public/node_modules/pivottable/examples/gh-fork-ribbon.ie.css +78 -0
- data/public/node_modules/pivottable/examples/index.html +85 -0
- data/public/node_modules/pivottable/examples/local.html +74 -0
- data/public/node_modules/pivottable/examples/montreal_2014.csv +366 -0
- data/public/node_modules/pivottable/examples/montreal_2014.html +106 -0
- data/public/node_modules/pivottable/examples/mps.csv +309 -0
- data/public/node_modules/pivottable/examples/mps.html +45 -0
- data/public/node_modules/pivottable/examples/mps.json +1 -0
- data/public/node_modules/pivottable/examples/mps_agg.html +44 -0
- data/public/node_modules/pivottable/examples/mps_csv.html +42 -0
- data/public/node_modules/pivottable/examples/mps_export.html +44 -0
- data/public/node_modules/pivottable/examples/mps_fr.html +40 -0
- data/public/node_modules/pivottable/examples/mps_prepop.html +42 -0
- data/public/node_modules/pivottable/examples/onrefresh.html +52 -0
- data/public/node_modules/pivottable/examples/rcsvs.html +87 -0
- data/public/node_modules/pivottable/examples/scatter.html +53 -0
- data/public/node_modules/pivottable/examples/show_code.js +17 -0
- data/public/node_modules/pivottable/examples/simple.html +41 -0
- data/public/node_modules/pivottable/examples/simple_agg.html +51 -0
- data/public/node_modules/pivottable/examples/simple_function.html +57 -0
- data/public/node_modules/pivottable/examples/simple_ui.html +42 -0
- data/public/node_modules/pivottable/examples/simple_ui_from_table.html +60 -0
- data/public/node_modules/pivottable/export_renderers.coffee +57 -0
- data/public/node_modules/pivottable/gchart_renderers.coffee +111 -0
- data/public/node_modules/pivottable/gulpFile.js +95 -0
- data/public/node_modules/pivottable/images/animation.gif +0 -0
- data/public/node_modules/pivottable/images/filters.png +0 -0
- data/public/node_modules/pivottable/images/gender_age_bins.png +0 -0
- data/public/node_modules/pivottable/images/gender_imbalance.png +0 -0
- data/public/node_modules/pivottable/images/gender_imbalance_instructions.png +0 -0
- data/public/node_modules/pivottable/images/initial_state.png +0 -0
- data/public/node_modules/pivottable/images/province_x_party_heatmap.png +0 -0
- data/public/node_modules/pivottable/images/province_x_party_heatmap_instructions.png +0 -0
- data/public/node_modules/pivottable/images/simple.png +0 -0
- data/public/node_modules/pivottable/images/simple_ui.png +0 -0
- data/public/node_modules/pivottable/images/whats_what.png +0 -0
- data/public/node_modules/pivottable/index.html +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/AUTHORS.txt +278 -0
- data/public/node_modules/pivottable/node_modules/jquery/LICENSE.txt +36 -0
- data/public/node_modules/pivottable/node_modules/jquery/README.md +65 -0
- data/public/node_modules/pivottable/node_modules/jquery/bower.json +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.js +9842 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.min.js +4 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.min.map +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.js +7877 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.min.js +4 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.min.map +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/package.json +122 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/LICENSE.txt +36 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.js +2143 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.min.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.min.map +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax.js +845 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/jsonp.js +100 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/load.js +83 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/parseJSON.js +13 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/parseXML.js +27 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/script.js +68 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/location.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/nonce.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/rquery.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/xhr.js +167 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes.js +11 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/attr.js +142 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/classes.js +177 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/prop.js +125 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/support.js +36 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/val.js +177 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/callbacks.js +232 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core.js +494 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/DOMEval.js +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/access.js +65 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/init.js +134 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/parseHTML.js +41 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/ready.js +103 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/support.js +18 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/var/rsingleTag.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css.js +515 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/addGetHookIf.js +24 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/adjustCSS.js +65 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/curCSS.js +60 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/defaultDisplay.js +72 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/hiddenVisibleSelectors.js +18 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/showHide.js +48 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/support.js +121 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/cssExpand.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/getStyles.js +15 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/isHidden.js +16 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/rmargin.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/rnumnonpx.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/swap.js +24 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data.js +187 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/Data.js +200 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/accepts.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/support.js +23 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/var/acceptData.js +18 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/var/dataPriv.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/var/dataUser.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/deferred.js +158 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/deferred/exceptionHook.js +19 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/deprecated.js +32 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/dimensions.js +54 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects.js +629 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects/Tween.js +121 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects/animatedSelector.js +13 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects/support.js +58 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event.js +710 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/ajax.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/alias.js +27 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/focusin.js +53 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/support.js +9 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/trigger.js +199 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/exports/amd.js +24 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/exports/global.js +26 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/intro.js +44 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/jquery.js +37 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation.js +481 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/_evalUrl.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/buildFragment.js +102 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/createSafeFragment.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/getAll.js +21 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/support.js +33 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/nodeNames.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rtagName.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/wrapMap.js +27 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/offset.js +218 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/outro.js +2 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/queue.js +143 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/queue/delay.js +22 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/selector-native.js +211 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/selector-sizzle.js +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/selector.js +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/serialize.js +125 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/support.js +63 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing.js +175 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/findFilter.js +100 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/dir.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/siblings.js +15 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/arr.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/class2type.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/concat.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/deletedIds.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/document.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/documentElement.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/hasOwn.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/indexOf.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/pnum.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/push.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/rcssNum.js +7 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/rnotwhite.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/slice.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/support.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/toString.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/wrap.js +79 -0
- data/public/node_modules/pivottable/package.json +70 -0
- data/public/node_modules/pivottable/pivot.coffee +957 -0
- data/public/node_modules/pivottable/pivot.es.coffee +57 -0
- data/public/node_modules/pivottable/pivot.fr.coffee +57 -0
- data/public/node_modules/pivottable/pivot.nl.coffee +55 -0
- data/public/node_modules/pivottable/pivot.pt.coffee +80 -0
- data/public/node_modules/pivottable/pivot.ru.coffee +56 -0
- data/public/node_modules/pivottable/pivot.tr.coffee +80 -0
- data/public/node_modules/pivottable/pivottable.jquery.json +33 -0
- data/public/node_modules/pivottable/tests/boot.js +152 -0
- data/public/node_modules/pivottable/tests/index.html +35 -0
- data/public/node_modules/pivottable/tests/pivot_spec.coffee +458 -0
- data/public/vendor.js +5 -0
- metadata +232 -1
@@ -0,0 +1,61 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Pivot Demo</title>
|
5
|
+
<!-- external libs from cdnjs -->
|
6
|
+
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css">
|
7
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
|
8
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.js"></script>
|
9
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
10
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
|
11
|
+
|
12
|
+
<!-- PivotTable.js libs from ../dist -->
|
13
|
+
<link rel="stylesheet" type="text/css" href="../dist/pivot.css">
|
14
|
+
<script type="text/javascript" src="../dist/pivot.js"></script>
|
15
|
+
<script type="text/javascript" src="../dist/c3_renderers.js"></script>
|
16
|
+
<style>
|
17
|
+
body {font-family: Verdana;}
|
18
|
+
|
19
|
+
.c3-line, .c3-focused {stroke-width: 3px !important;}
|
20
|
+
.c3-bar {stroke: white !important; stroke-width: 1;}
|
21
|
+
.c3 text { font-size: 12px; color: grey;}
|
22
|
+
.tick line {stroke: white;}
|
23
|
+
.c3-axis path {stroke: grey;}
|
24
|
+
.c3-circle { opacity: 1 !important; }
|
25
|
+
</style>
|
26
|
+
|
27
|
+
<!-- for examples only! script to show code to user -->
|
28
|
+
<script type="text/javascript" src="show_code.js"></script>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<script type="text/javascript">
|
32
|
+
// This example adds C3 chart renderers.
|
33
|
+
|
34
|
+
$(function(){
|
35
|
+
|
36
|
+
var derivers = $.pivotUtilities.derivers;
|
37
|
+
var renderers = $.extend($.pivotUtilities.renderers,
|
38
|
+
$.pivotUtilities.c3_renderers);
|
39
|
+
|
40
|
+
$.getJSON("mps.json", function(mps) {
|
41
|
+
$("#output").pivotUI(mps, {
|
42
|
+
renderers: renderers,
|
43
|
+
derivedAttributes: {
|
44
|
+
"Age Bin": derivers.bin("Age", 10),
|
45
|
+
"Gender Imbalance": function(mp) {
|
46
|
+
return mp["Gender"] == "Male" ? 1 : -1;
|
47
|
+
}
|
48
|
+
},
|
49
|
+
cols: ["Age Bin"], rows: ["Gender"],
|
50
|
+
rendererName: "Area Chart"
|
51
|
+
});
|
52
|
+
});
|
53
|
+
});
|
54
|
+
</script>
|
55
|
+
|
56
|
+
<p><a href="index.html">« back to examples</a></p>
|
57
|
+
|
58
|
+
<div id="output" style="margin: 30px;"></div>
|
59
|
+
|
60
|
+
</body>
|
61
|
+
</html>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Pivot Demo</title>
|
5
|
+
<!-- external libs from cdnjs -->
|
6
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
|
7
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
8
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
|
9
|
+
|
10
|
+
<!-- PivotTable.js libs from ../dist -->
|
11
|
+
<link rel="stylesheet" type="text/css" href="../dist/pivot.css">
|
12
|
+
<script type="text/javascript" src="../dist/pivot.js"></script>
|
13
|
+
<script type="text/javascript" src="../dist/d3_renderers.js"></script>
|
14
|
+
<style>
|
15
|
+
body {font-family: Verdana;}
|
16
|
+
.node {
|
17
|
+
border: solid 1px white;
|
18
|
+
font: 10px sans-serif;
|
19
|
+
line-height: 12px;
|
20
|
+
overflow: hidden;
|
21
|
+
position: absolute;
|
22
|
+
text-indent: 2px;
|
23
|
+
}
|
24
|
+
</style>
|
25
|
+
|
26
|
+
<!-- for examples only! script to show code to user -->
|
27
|
+
<script type="text/javascript" src="show_code.js"></script>
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<script type="text/javascript">
|
31
|
+
// This example of a D3 renderer shows a treemap.
|
32
|
+
|
33
|
+
$(function(){
|
34
|
+
$.getJSON("mps.json", function(mps) {
|
35
|
+
$("#output").pivotUI(mps, {
|
36
|
+
renderers: $.pivotUtilities.d3_renderers,
|
37
|
+
cols: [], rows: ["Province", "Party"],
|
38
|
+
rendererName: "Treemap"
|
39
|
+
});
|
40
|
+
});
|
41
|
+
});
|
42
|
+
</script>
|
43
|
+
|
44
|
+
<p><a href="index.html">« back to examples</a></p>
|
45
|
+
|
46
|
+
<div id="output" style="margin: 30px;"></div>
|
47
|
+
|
48
|
+
</body>
|
49
|
+
</html>
|
@@ -0,0 +1,80 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Pivot Demo</title>
|
5
|
+
|
6
|
+
<!-- external libs from cdnjs -->
|
7
|
+
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css">
|
8
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
9
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
|
10
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
|
11
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
|
12
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-csv/0.71/jquery.csv-0.71.min.js"></script>
|
13
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.js"></script>
|
14
|
+
|
15
|
+
<!-- PivotTable.js libs from ../dist -->
|
16
|
+
<link rel="stylesheet" type="text/css" href="../dist/pivot.css">
|
17
|
+
<script type="text/javascript" src="../dist/pivot.js"></script>
|
18
|
+
<script type="text/javascript" src="../dist/export_renderers.js"></script>
|
19
|
+
<script type="text/javascript" src="../dist/d3_renderers.js"></script>
|
20
|
+
<script type="text/javascript" src="../dist/c3_renderers.js"></script>
|
21
|
+
|
22
|
+
<style>
|
23
|
+
body {font-family: Verdana;}
|
24
|
+
.node {
|
25
|
+
border: solid 1px white;
|
26
|
+
font: 10px sans-serif;
|
27
|
+
line-height: 12px;
|
28
|
+
overflow: hidden;
|
29
|
+
position: absolute;
|
30
|
+
text-indent: 2px;
|
31
|
+
}
|
32
|
+
.c3-line, .c3-focused {stroke-width: 3px !important;}
|
33
|
+
.c3-bar {stroke: white !important; stroke-width: 1;}
|
34
|
+
.c3 text { font-size: 12px; color: grey;}
|
35
|
+
.tick line {stroke: white;}
|
36
|
+
.c3-axis path {stroke: grey;}
|
37
|
+
.c3-circle { opacity: 1 !important; }
|
38
|
+
</style>
|
39
|
+
|
40
|
+
<!-- for examples only! script to show code to user -->
|
41
|
+
<script type="text/javascript" src="show_code.js"></script>
|
42
|
+
</head>
|
43
|
+
<body>
|
44
|
+
<script type="text/javascript">
|
45
|
+
// This example has all the renderers loaded,
|
46
|
+
// and should work with touch devices.
|
47
|
+
|
48
|
+
$(function(){
|
49
|
+
var derivers = $.pivotUtilities.derivers;
|
50
|
+
|
51
|
+
var renderers = $.extend(
|
52
|
+
$.pivotUtilities.renderers,
|
53
|
+
$.pivotUtilities.c3_renderers,
|
54
|
+
$.pivotUtilities.d3_renderers,
|
55
|
+
$.pivotUtilities.export_renderers
|
56
|
+
);
|
57
|
+
|
58
|
+
$.getJSON("mps.json", function(mps) {
|
59
|
+
$("#output").pivotUI(mps, {
|
60
|
+
renderers: renderers,
|
61
|
+
derivedAttributes: {
|
62
|
+
"Age Bin": derivers.bin("Age", 10),
|
63
|
+
"Gender Imbalance": function(mp) {
|
64
|
+
return mp["Gender"] == "Male" ? 1 : -1;
|
65
|
+
}
|
66
|
+
},
|
67
|
+
cols: ["Age Bin"], rows: ["Gender"],
|
68
|
+
rendererName: "Table Barchart"
|
69
|
+
});
|
70
|
+
});
|
71
|
+
});
|
72
|
+
</script>
|
73
|
+
|
74
|
+
<p><a href="index.html">« back to examples</a></p>
|
75
|
+
|
76
|
+
|
77
|
+
<div id="output" style="margin: 30px;"></div>
|
78
|
+
|
79
|
+
</body>
|
80
|
+
</html>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Pivot Demo</title>
|
5
|
+
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
6
|
+
|
7
|
+
<!-- external libs from cdnjs -->
|
8
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
9
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
|
10
|
+
|
11
|
+
<!-- PivotTable.js libs from ../dist -->
|
12
|
+
<link rel="stylesheet" type="text/css" href="../dist/pivot.css">
|
13
|
+
<script type="text/javascript" src="../dist/pivot.js"></script>
|
14
|
+
<script type="text/javascript" src="../dist/gchart_renderers.js"></script>
|
15
|
+
<style>
|
16
|
+
body {font-family: Verdana;}
|
17
|
+
</style>
|
18
|
+
|
19
|
+
<!-- for examples only! script to show code to user -->
|
20
|
+
<script type="text/javascript" src="show_code.js"></script>
|
21
|
+
</head>
|
22
|
+
<body>
|
23
|
+
<script type="text/javascript">
|
24
|
+
// This example adds Google Chart renderers.
|
25
|
+
|
26
|
+
google.load("visualization", "1", {packages:["corechart", "charteditor"]});
|
27
|
+
$(function(){
|
28
|
+
var derivers = $.pivotUtilities.derivers;
|
29
|
+
var renderers = $.extend($.pivotUtilities.renderers,
|
30
|
+
$.pivotUtilities.gchart_renderers);
|
31
|
+
|
32
|
+
$.getJSON("mps.json", function(mps) {
|
33
|
+
$("#output").pivotUI(mps, {
|
34
|
+
renderers: renderers,
|
35
|
+
derivedAttributes: {
|
36
|
+
"Age Bin": derivers.bin("Age", 10),
|
37
|
+
"Gender Imbalance": function(mp) {
|
38
|
+
return mp["Gender"] == "Male" ? 1 : -1;
|
39
|
+
}
|
40
|
+
},
|
41
|
+
cols: ["Age Bin"], rows: ["Gender"],
|
42
|
+
rendererName: "Area Chart"
|
43
|
+
});
|
44
|
+
});
|
45
|
+
});
|
46
|
+
</script>
|
47
|
+
|
48
|
+
<p><a href="index.html">« back to examples</a></p>
|
49
|
+
|
50
|
+
<div id="output" style="margin: 30px;"></div>
|
51
|
+
|
52
|
+
</body>
|
53
|
+
</html>
|
@@ -0,0 +1,140 @@
|
|
1
|
+
/*!
|
2
|
+
* "Fork me on GitHub" CSS ribbon v0.1.1 | MIT License
|
3
|
+
* https://github.com/simonwhitaker/github-fork-ribbon-css
|
4
|
+
*/
|
5
|
+
|
6
|
+
/* Left will inherit from right (so we don't need to duplicate code) */
|
7
|
+
.github-fork-ribbon {
|
8
|
+
/* The right and left classes determine the side we attach our banner to */
|
9
|
+
position: absolute;
|
10
|
+
|
11
|
+
/* Add a bit of padding to give some substance outside the "stitching" */
|
12
|
+
padding: 2px 0;
|
13
|
+
|
14
|
+
/* Set the base colour */
|
15
|
+
background-color: #a00;
|
16
|
+
|
17
|
+
/* Set a gradient: transparent black at the top to almost-transparent black at the bottom */
|
18
|
+
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15)));
|
19
|
+
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
|
20
|
+
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
|
21
|
+
background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
|
22
|
+
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
|
23
|
+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
|
24
|
+
|
25
|
+
/* Add a drop shadow */
|
26
|
+
-webkit-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.5);
|
27
|
+
-moz-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.5);
|
28
|
+
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.5);
|
29
|
+
|
30
|
+
/* Set the font */
|
31
|
+
font: 700 13px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
32
|
+
|
33
|
+
z-index: 9999;
|
34
|
+
pointer-events: auto;
|
35
|
+
}
|
36
|
+
|
37
|
+
.github-fork-ribbon a,
|
38
|
+
.github-fork-ribbon a:hover {
|
39
|
+
/* Set the text properties */
|
40
|
+
color: #fff;
|
41
|
+
text-decoration: none;
|
42
|
+
text-shadow: 0 -1px rgba(0, 0, 0, 0.5);
|
43
|
+
text-align: center;
|
44
|
+
|
45
|
+
/* Set the geometry. If you fiddle with these you'll also need
|
46
|
+
to tweak the top and right values in .github-fork-ribbon. */
|
47
|
+
width: 200px;
|
48
|
+
line-height: 20px;
|
49
|
+
|
50
|
+
/* Set the layout properties */
|
51
|
+
display: inline-block;
|
52
|
+
padding: 2px 0;
|
53
|
+
|
54
|
+
/* Add "stitching" effect */
|
55
|
+
border-width: 1px 0;
|
56
|
+
border-style: dotted;
|
57
|
+
border-color: #fff;
|
58
|
+
border-color: rgba(255, 255, 255, 0.7);
|
59
|
+
}
|
60
|
+
|
61
|
+
.github-fork-ribbon-wrapper {
|
62
|
+
width: 150px;
|
63
|
+
height: 150px;
|
64
|
+
position: absolute;
|
65
|
+
overflow: hidden;
|
66
|
+
top: 0;
|
67
|
+
z-index: 9999;
|
68
|
+
pointer-events: none;
|
69
|
+
}
|
70
|
+
|
71
|
+
.github-fork-ribbon-wrapper.fixed {
|
72
|
+
position: fixed;
|
73
|
+
}
|
74
|
+
|
75
|
+
.github-fork-ribbon-wrapper.left {
|
76
|
+
left: 0;
|
77
|
+
}
|
78
|
+
|
79
|
+
.github-fork-ribbon-wrapper.right {
|
80
|
+
right: 0;
|
81
|
+
}
|
82
|
+
|
83
|
+
.github-fork-ribbon-wrapper.left-bottom {
|
84
|
+
position: fixed;
|
85
|
+
top: inherit;
|
86
|
+
bottom: 0;
|
87
|
+
left: 0;
|
88
|
+
}
|
89
|
+
|
90
|
+
.github-fork-ribbon-wrapper.right-bottom {
|
91
|
+
position: fixed;
|
92
|
+
top: inherit;
|
93
|
+
bottom: 0;
|
94
|
+
right: 0;
|
95
|
+
}
|
96
|
+
|
97
|
+
.github-fork-ribbon-wrapper.right .github-fork-ribbon {
|
98
|
+
top: 42px;
|
99
|
+
right: -43px;
|
100
|
+
|
101
|
+
-webkit-transform: rotate(45deg);
|
102
|
+
-moz-transform: rotate(45deg);
|
103
|
+
-ms-transform: rotate(45deg);
|
104
|
+
-o-transform: rotate(45deg);
|
105
|
+
transform: rotate(45deg);
|
106
|
+
}
|
107
|
+
|
108
|
+
.github-fork-ribbon-wrapper.left .github-fork-ribbon {
|
109
|
+
top: 42px;
|
110
|
+
left: -43px;
|
111
|
+
|
112
|
+
-webkit-transform: rotate(-45deg);
|
113
|
+
-moz-transform: rotate(-45deg);
|
114
|
+
-ms-transform: rotate(-45deg);
|
115
|
+
-o-transform: rotate(-45deg);
|
116
|
+
transform: rotate(-45deg);
|
117
|
+
}
|
118
|
+
|
119
|
+
|
120
|
+
.github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon {
|
121
|
+
top: 80px;
|
122
|
+
left: -43px;
|
123
|
+
|
124
|
+
-webkit-transform: rotate(45deg);
|
125
|
+
-moz-transform: rotate(45deg);
|
126
|
+
-ms-transform: rotate(45deg);
|
127
|
+
-o-transform: rotate(45deg);
|
128
|
+
transform: rotate(45deg);
|
129
|
+
}
|
130
|
+
|
131
|
+
.github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon {
|
132
|
+
top: 80px;
|
133
|
+
right: -43px;
|
134
|
+
|
135
|
+
-webkit-transform: rotate(-45deg);
|
136
|
+
-moz-transform: rotate(-45deg);
|
137
|
+
-ms-transform: rotate(-45deg);
|
138
|
+
-o-transform: rotate(-45deg);
|
139
|
+
transform: rotate(-45deg);
|
140
|
+
}
|
@@ -0,0 +1,78 @@
|
|
1
|
+
/*!
|
2
|
+
* "Fork me on GitHub" CSS ribbon v0.1.1 | MIT License
|
3
|
+
* https://github.com/simonwhitaker/github-fork-ribbon-css
|
4
|
+
*/
|
5
|
+
|
6
|
+
/* IE voodoo courtesy of http://stackoverflow.com/a/4617511/263871 and
|
7
|
+
* http://www.useragentman.com/IETransformsTranslator */
|
8
|
+
|
9
|
+
.github-fork-ribbon {
|
10
|
+
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#000000', EndColorStr='#000000');
|
11
|
+
}
|
12
|
+
|
13
|
+
.github-fork-ribbon-wrapper.right .github-fork-ribbon {
|
14
|
+
/* IE positioning hack (couldn't find a transform-origin alternative for IE) */
|
15
|
+
top: -22px;
|
16
|
+
right: -62px;
|
17
|
+
|
18
|
+
/* IE8+ */
|
19
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865474, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865474, SizingMethod='auto expand')";
|
20
|
+
/* IE6 and 7 */
|
21
|
+
filter: progid:DXImageTransform.Microsoft.Matrix(
|
22
|
+
M11=0.7071067811865474,
|
23
|
+
M12=-0.7071067811865477,
|
24
|
+
M21=0.7071067811865477,
|
25
|
+
M22=0.7071067811865474,
|
26
|
+
SizingMethod='auto expand'
|
27
|
+
);
|
28
|
+
}
|
29
|
+
|
30
|
+
.github-fork-ribbon-wrapper.left .github-fork-ribbon {
|
31
|
+
top: -22px;
|
32
|
+
left: -22px;
|
33
|
+
|
34
|
+
/* IE8+ */
|
35
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865483, M12=0.7071067811865467, M21=-0.7071067811865467, M22=0.7071067811865483, SizingMethod='auto expand')";
|
36
|
+
/* IE6 and 7 */
|
37
|
+
filter: progid:DXImageTransform.Microsoft.Matrix(
|
38
|
+
M11=0.7071067811865483,
|
39
|
+
M12=0.7071067811865467,
|
40
|
+
M21=-0.7071067811865467,
|
41
|
+
M22=0.7071067811865483,
|
42
|
+
SizingMethod='auto expand'
|
43
|
+
);
|
44
|
+
}
|
45
|
+
|
46
|
+
.github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon {
|
47
|
+
/* IE positioning hack (couldn't find a transform-origin alternative for IE) */
|
48
|
+
top: 12px;
|
49
|
+
left: -22px;
|
50
|
+
|
51
|
+
|
52
|
+
/* IE8+ */
|
53
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865474, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865474, SizingMethod='auto expand')";
|
54
|
+
/* IE6 and 7 */
|
55
|
+
/* filter: progid:DXImageTransform.Microsoft.Matrix(
|
56
|
+
M11=0.7071067811865474,
|
57
|
+
M12=-0.7071067811865477,
|
58
|
+
M21=0.7071067811865477,
|
59
|
+
M22=0.7071067811865474,
|
60
|
+
SizingMethod='auto expand'
|
61
|
+
);
|
62
|
+
*/}
|
63
|
+
|
64
|
+
.github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon {
|
65
|
+
top: 12px;
|
66
|
+
right: -62px;
|
67
|
+
|
68
|
+
/* IE8+ */
|
69
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865483, M12=0.7071067811865467, M21=-0.7071067811865467, M22=0.7071067811865483, SizingMethod='auto expand')";
|
70
|
+
/* IE6 and 7 */
|
71
|
+
filter: progid:DXImageTransform.Microsoft.Matrix(
|
72
|
+
M11=0.7071067811865483,
|
73
|
+
M12=0.7071067811865467,
|
74
|
+
M21=-0.7071067811865467,
|
75
|
+
M22=0.7071067811865483,
|
76
|
+
SizingMethod='auto expand'
|
77
|
+
);
|
78
|
+
}
|