postrest 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/lib/app.rb +1 -1
  3. data/public/index.htm +116 -0
  4. data/public/node_modules/pivottable/CONTRIBUTING.md +19 -0
  5. data/public/node_modules/pivottable/LICENSE.md +9 -0
  6. data/public/node_modules/pivottable/ReadMe.md +155 -0
  7. data/public/node_modules/pivottable/bower.json +31 -0
  8. data/public/node_modules/pivottable/c3_renderers.coffee +155 -0
  9. data/public/node_modules/pivottable/d3_renderers.coffee +73 -0
  10. data/public/node_modules/pivottable/dist/c3_renderers.js +256 -0
  11. data/public/node_modules/pivottable/dist/c3_renderers.js.map +1 -0
  12. data/public/node_modules/pivottable/dist/c3_renderers.min.js +2 -0
  13. data/public/node_modules/pivottable/dist/c3_renderers.min.js.map +1 -0
  14. data/public/node_modules/pivottable/dist/d3_renderers.js +105 -0
  15. data/public/node_modules/pivottable/dist/d3_renderers.js.map +1 -0
  16. data/public/node_modules/pivottable/dist/d3_renderers.min.js +2 -0
  17. data/public/node_modules/pivottable/dist/d3_renderers.min.js.map +1 -0
  18. data/public/node_modules/pivottable/dist/export_renderers.js +80 -0
  19. data/public/node_modules/pivottable/dist/export_renderers.js.map +1 -0
  20. data/public/node_modules/pivottable/dist/export_renderers.min.js +2 -0
  21. data/public/node_modules/pivottable/dist/export_renderers.min.js.map +1 -0
  22. data/public/node_modules/pivottable/dist/gchart_renderers.js +183 -0
  23. data/public/node_modules/pivottable/dist/gchart_renderers.js.map +1 -0
  24. data/public/node_modules/pivottable/dist/gchart_renderers.min.js +2 -0
  25. data/public/node_modules/pivottable/dist/gchart_renderers.min.js.map +1 -0
  26. data/public/node_modules/pivottable/dist/pivot.css +97 -0
  27. data/public/node_modules/pivottable/dist/pivot.es.js +78 -0
  28. data/public/node_modules/pivottable/dist/pivot.es.js.map +1 -0
  29. data/public/node_modules/pivottable/dist/pivot.es.min.js +2 -0
  30. data/public/node_modules/pivottable/dist/pivot.es.min.js.map +1 -0
  31. data/public/node_modules/pivottable/dist/pivot.fr.js +78 -0
  32. data/public/node_modules/pivottable/dist/pivot.fr.js.map +1 -0
  33. data/public/node_modules/pivottable/dist/pivot.fr.min.js +2 -0
  34. data/public/node_modules/pivottable/dist/pivot.fr.min.js.map +1 -0
  35. data/public/node_modules/pivottable/dist/pivot.js +1511 -0
  36. data/public/node_modules/pivottable/dist/pivot.js.map +1 -0
  37. data/public/node_modules/pivottable/dist/pivot.min.css +1 -0
  38. data/public/node_modules/pivottable/dist/pivot.min.js +2 -0
  39. data/public/node_modules/pivottable/dist/pivot.min.js.map +1 -0
  40. data/public/node_modules/pivottable/dist/pivot.nl.js +78 -0
  41. data/public/node_modules/pivottable/dist/pivot.nl.js.map +1 -0
  42. data/public/node_modules/pivottable/dist/pivot.nl.min.js +2 -0
  43. data/public/node_modules/pivottable/dist/pivot.nl.min.js.map +1 -0
  44. data/public/node_modules/pivottable/dist/pivot.pt.js +104 -0
  45. data/public/node_modules/pivottable/dist/pivot.pt.js.map +1 -0
  46. data/public/node_modules/pivottable/dist/pivot.pt.min.js +2 -0
  47. data/public/node_modules/pivottable/dist/pivot.pt.min.js.map +1 -0
  48. data/public/node_modules/pivottable/dist/pivot.ru.js +78 -0
  49. data/public/node_modules/pivottable/dist/pivot.ru.js.map +1 -0
  50. data/public/node_modules/pivottable/dist/pivot.ru.min.js +2 -0
  51. data/public/node_modules/pivottable/dist/pivot.ru.min.js.map +1 -0
  52. data/public/node_modules/pivottable/dist/pivot.tr.js +104 -0
  53. data/public/node_modules/pivottable/dist/pivot.tr.js.map +1 -0
  54. data/public/node_modules/pivottable/dist/pivot.tr.min.js +2 -0
  55. data/public/node_modules/pivottable/dist/pivot.tr.min.js.map +1 -0
  56. data/public/node_modules/pivottable/dist/tips_data.min.js +247 -0
  57. data/public/node_modules/pivottable/examples/c3.html +61 -0
  58. data/public/node_modules/pivottable/examples/d3.html +49 -0
  59. data/public/node_modules/pivottable/examples/fully_loaded.html +80 -0
  60. data/public/node_modules/pivottable/examples/gchart.html +53 -0
  61. data/public/node_modules/pivottable/examples/gh-fork-ribbon.css +140 -0
  62. data/public/node_modules/pivottable/examples/gh-fork-ribbon.ie.css +78 -0
  63. data/public/node_modules/pivottable/examples/index.html +85 -0
  64. data/public/node_modules/pivottable/examples/local.html +74 -0
  65. data/public/node_modules/pivottable/examples/montreal_2014.csv +366 -0
  66. data/public/node_modules/pivottable/examples/montreal_2014.html +106 -0
  67. data/public/node_modules/pivottable/examples/mps.csv +309 -0
  68. data/public/node_modules/pivottable/examples/mps.html +45 -0
  69. data/public/node_modules/pivottable/examples/mps.json +1 -0
  70. data/public/node_modules/pivottable/examples/mps_agg.html +44 -0
  71. data/public/node_modules/pivottable/examples/mps_csv.html +42 -0
  72. data/public/node_modules/pivottable/examples/mps_export.html +44 -0
  73. data/public/node_modules/pivottable/examples/mps_fr.html +40 -0
  74. data/public/node_modules/pivottable/examples/mps_prepop.html +42 -0
  75. data/public/node_modules/pivottable/examples/onrefresh.html +52 -0
  76. data/public/node_modules/pivottable/examples/rcsvs.html +87 -0
  77. data/public/node_modules/pivottable/examples/scatter.html +53 -0
  78. data/public/node_modules/pivottable/examples/show_code.js +17 -0
  79. data/public/node_modules/pivottable/examples/simple.html +41 -0
  80. data/public/node_modules/pivottable/examples/simple_agg.html +51 -0
  81. data/public/node_modules/pivottable/examples/simple_function.html +57 -0
  82. data/public/node_modules/pivottable/examples/simple_ui.html +42 -0
  83. data/public/node_modules/pivottable/examples/simple_ui_from_table.html +60 -0
  84. data/public/node_modules/pivottable/export_renderers.coffee +57 -0
  85. data/public/node_modules/pivottable/gchart_renderers.coffee +111 -0
  86. data/public/node_modules/pivottable/gulpFile.js +95 -0
  87. data/public/node_modules/pivottable/images/animation.gif +0 -0
  88. data/public/node_modules/pivottable/images/filters.png +0 -0
  89. data/public/node_modules/pivottable/images/gender_age_bins.png +0 -0
  90. data/public/node_modules/pivottable/images/gender_imbalance.png +0 -0
  91. data/public/node_modules/pivottable/images/gender_imbalance_instructions.png +0 -0
  92. data/public/node_modules/pivottable/images/initial_state.png +0 -0
  93. data/public/node_modules/pivottable/images/province_x_party_heatmap.png +0 -0
  94. data/public/node_modules/pivottable/images/province_x_party_heatmap_instructions.png +0 -0
  95. data/public/node_modules/pivottable/images/simple.png +0 -0
  96. data/public/node_modules/pivottable/images/simple_ui.png +0 -0
  97. data/public/node_modules/pivottable/images/whats_what.png +0 -0
  98. data/public/node_modules/pivottable/index.html +14 -0
  99. data/public/node_modules/pivottable/node_modules/jquery/AUTHORS.txt +278 -0
  100. data/public/node_modules/pivottable/node_modules/jquery/LICENSE.txt +36 -0
  101. data/public/node_modules/pivottable/node_modules/jquery/README.md +65 -0
  102. data/public/node_modules/pivottable/node_modules/jquery/bower.json +14 -0
  103. data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.js +9842 -0
  104. data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.min.js +4 -0
  105. data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.min.map +1 -0
  106. data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.js +7877 -0
  107. data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.min.js +4 -0
  108. data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.min.map +1 -0
  109. data/public/node_modules/pivottable/node_modules/jquery/package.json +122 -0
  110. data/public/node_modules/pivottable/node_modules/jquery/sizzle/LICENSE.txt +36 -0
  111. data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.js +2143 -0
  112. data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.min.js +3 -0
  113. data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.min.map +1 -0
  114. data/public/node_modules/pivottable/node_modules/jquery/src/ajax.js +845 -0
  115. data/public/node_modules/pivottable/node_modules/jquery/src/ajax/jsonp.js +100 -0
  116. data/public/node_modules/pivottable/node_modules/jquery/src/ajax/load.js +83 -0
  117. data/public/node_modules/pivottable/node_modules/jquery/src/ajax/parseJSON.js +13 -0
  118. data/public/node_modules/pivottable/node_modules/jquery/src/ajax/parseXML.js +27 -0
  119. data/public/node_modules/pivottable/node_modules/jquery/src/ajax/script.js +68 -0
  120. data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/location.js +3 -0
  121. data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/nonce.js +5 -0
  122. data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/rquery.js +3 -0
  123. data/public/node_modules/pivottable/node_modules/jquery/src/ajax/xhr.js +167 -0
  124. data/public/node_modules/pivottable/node_modules/jquery/src/attributes.js +11 -0
  125. data/public/node_modules/pivottable/node_modules/jquery/src/attributes/attr.js +142 -0
  126. data/public/node_modules/pivottable/node_modules/jquery/src/attributes/classes.js +177 -0
  127. data/public/node_modules/pivottable/node_modules/jquery/src/attributes/prop.js +125 -0
  128. data/public/node_modules/pivottable/node_modules/jquery/src/attributes/support.js +36 -0
  129. data/public/node_modules/pivottable/node_modules/jquery/src/attributes/val.js +177 -0
  130. data/public/node_modules/pivottable/node_modules/jquery/src/callbacks.js +232 -0
  131. data/public/node_modules/pivottable/node_modules/jquery/src/core.js +494 -0
  132. data/public/node_modules/pivottable/node_modules/jquery/src/core/DOMEval.js +14 -0
  133. data/public/node_modules/pivottable/node_modules/jquery/src/core/access.js +65 -0
  134. data/public/node_modules/pivottable/node_modules/jquery/src/core/init.js +134 -0
  135. data/public/node_modules/pivottable/node_modules/jquery/src/core/parseHTML.js +41 -0
  136. data/public/node_modules/pivottable/node_modules/jquery/src/core/ready.js +103 -0
  137. data/public/node_modules/pivottable/node_modules/jquery/src/core/support.js +18 -0
  138. data/public/node_modules/pivottable/node_modules/jquery/src/core/var/rsingleTag.js +5 -0
  139. data/public/node_modules/pivottable/node_modules/jquery/src/css.js +515 -0
  140. data/public/node_modules/pivottable/node_modules/jquery/src/css/addGetHookIf.js +24 -0
  141. data/public/node_modules/pivottable/node_modules/jquery/src/css/adjustCSS.js +65 -0
  142. data/public/node_modules/pivottable/node_modules/jquery/src/css/curCSS.js +60 -0
  143. data/public/node_modules/pivottable/node_modules/jquery/src/css/defaultDisplay.js +72 -0
  144. data/public/node_modules/pivottable/node_modules/jquery/src/css/hiddenVisibleSelectors.js +18 -0
  145. data/public/node_modules/pivottable/node_modules/jquery/src/css/showHide.js +48 -0
  146. data/public/node_modules/pivottable/node_modules/jquery/src/css/support.js +121 -0
  147. data/public/node_modules/pivottable/node_modules/jquery/src/css/var/cssExpand.js +3 -0
  148. data/public/node_modules/pivottable/node_modules/jquery/src/css/var/getStyles.js +15 -0
  149. data/public/node_modules/pivottable/node_modules/jquery/src/css/var/isHidden.js +16 -0
  150. data/public/node_modules/pivottable/node_modules/jquery/src/css/var/rmargin.js +3 -0
  151. data/public/node_modules/pivottable/node_modules/jquery/src/css/var/rnumnonpx.js +5 -0
  152. data/public/node_modules/pivottable/node_modules/jquery/src/css/var/swap.js +24 -0
  153. data/public/node_modules/pivottable/node_modules/jquery/src/data.js +187 -0
  154. data/public/node_modules/pivottable/node_modules/jquery/src/data/Data.js +200 -0
  155. data/public/node_modules/pivottable/node_modules/jquery/src/data/accepts.js +20 -0
  156. data/public/node_modules/pivottable/node_modules/jquery/src/data/support.js +23 -0
  157. data/public/node_modules/pivottable/node_modules/jquery/src/data/var/acceptData.js +18 -0
  158. data/public/node_modules/pivottable/node_modules/jquery/src/data/var/dataPriv.js +5 -0
  159. data/public/node_modules/pivottable/node_modules/jquery/src/data/var/dataUser.js +5 -0
  160. data/public/node_modules/pivottable/node_modules/jquery/src/deferred.js +158 -0
  161. data/public/node_modules/pivottable/node_modules/jquery/src/deferred/exceptionHook.js +19 -0
  162. data/public/node_modules/pivottable/node_modules/jquery/src/deprecated.js +32 -0
  163. data/public/node_modules/pivottable/node_modules/jquery/src/dimensions.js +54 -0
  164. data/public/node_modules/pivottable/node_modules/jquery/src/effects.js +629 -0
  165. data/public/node_modules/pivottable/node_modules/jquery/src/effects/Tween.js +121 -0
  166. data/public/node_modules/pivottable/node_modules/jquery/src/effects/animatedSelector.js +13 -0
  167. data/public/node_modules/pivottable/node_modules/jquery/src/effects/support.js +58 -0
  168. data/public/node_modules/pivottable/node_modules/jquery/src/event.js +710 -0
  169. data/public/node_modules/pivottable/node_modules/jquery/src/event/ajax.js +20 -0
  170. data/public/node_modules/pivottable/node_modules/jquery/src/event/alias.js +27 -0
  171. data/public/node_modules/pivottable/node_modules/jquery/src/event/focusin.js +53 -0
  172. data/public/node_modules/pivottable/node_modules/jquery/src/event/support.js +9 -0
  173. data/public/node_modules/pivottable/node_modules/jquery/src/event/trigger.js +199 -0
  174. data/public/node_modules/pivottable/node_modules/jquery/src/exports/amd.js +24 -0
  175. data/public/node_modules/pivottable/node_modules/jquery/src/exports/global.js +26 -0
  176. data/public/node_modules/pivottable/node_modules/jquery/src/intro.js +44 -0
  177. data/public/node_modules/pivottable/node_modules/jquery/src/jquery.js +37 -0
  178. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation.js +481 -0
  179. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/_evalUrl.js +20 -0
  180. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/buildFragment.js +102 -0
  181. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/createSafeFragment.js +20 -0
  182. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/getAll.js +21 -0
  183. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/setGlobalEval.js +20 -0
  184. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/support.js +33 -0
  185. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/nodeNames.js +5 -0
  186. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rcheckableType.js +3 -0
  187. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +3 -0
  188. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rscriptType.js +3 -0
  189. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rtagName.js +3 -0
  190. data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/wrapMap.js +27 -0
  191. data/public/node_modules/pivottable/node_modules/jquery/src/offset.js +218 -0
  192. data/public/node_modules/pivottable/node_modules/jquery/src/outro.js +2 -0
  193. data/public/node_modules/pivottable/node_modules/jquery/src/queue.js +143 -0
  194. data/public/node_modules/pivottable/node_modules/jquery/src/queue/delay.js +22 -0
  195. data/public/node_modules/pivottable/node_modules/jquery/src/selector-native.js +211 -0
  196. data/public/node_modules/pivottable/node_modules/jquery/src/selector-sizzle.js +14 -0
  197. data/public/node_modules/pivottable/node_modules/jquery/src/selector.js +1 -0
  198. data/public/node_modules/pivottable/node_modules/jquery/src/serialize.js +125 -0
  199. data/public/node_modules/pivottable/node_modules/jquery/src/support.js +63 -0
  200. data/public/node_modules/pivottable/node_modules/jquery/src/traversing.js +175 -0
  201. data/public/node_modules/pivottable/node_modules/jquery/src/traversing/findFilter.js +100 -0
  202. data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/dir.js +20 -0
  203. data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/rneedsContext.js +6 -0
  204. data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/siblings.js +15 -0
  205. data/public/node_modules/pivottable/node_modules/jquery/src/var/arr.js +3 -0
  206. data/public/node_modules/pivottable/node_modules/jquery/src/var/class2type.js +5 -0
  207. data/public/node_modules/pivottable/node_modules/jquery/src/var/concat.js +5 -0
  208. data/public/node_modules/pivottable/node_modules/jquery/src/var/deletedIds.js +3 -0
  209. data/public/node_modules/pivottable/node_modules/jquery/src/var/document.js +3 -0
  210. data/public/node_modules/pivottable/node_modules/jquery/src/var/documentElement.js +5 -0
  211. data/public/node_modules/pivottable/node_modules/jquery/src/var/hasOwn.js +5 -0
  212. data/public/node_modules/pivottable/node_modules/jquery/src/var/indexOf.js +5 -0
  213. data/public/node_modules/pivottable/node_modules/jquery/src/var/pnum.js +3 -0
  214. data/public/node_modules/pivottable/node_modules/jquery/src/var/push.js +5 -0
  215. data/public/node_modules/pivottable/node_modules/jquery/src/var/rcssNum.js +7 -0
  216. data/public/node_modules/pivottable/node_modules/jquery/src/var/rnotwhite.js +3 -0
  217. data/public/node_modules/pivottable/node_modules/jquery/src/var/slice.js +5 -0
  218. data/public/node_modules/pivottable/node_modules/jquery/src/var/support.js +5 -0
  219. data/public/node_modules/pivottable/node_modules/jquery/src/var/toString.js +5 -0
  220. data/public/node_modules/pivottable/node_modules/jquery/src/wrap.js +79 -0
  221. data/public/node_modules/pivottable/package.json +70 -0
  222. data/public/node_modules/pivottable/pivot.coffee +957 -0
  223. data/public/node_modules/pivottable/pivot.es.coffee +57 -0
  224. data/public/node_modules/pivottable/pivot.fr.coffee +57 -0
  225. data/public/node_modules/pivottable/pivot.nl.coffee +55 -0
  226. data/public/node_modules/pivottable/pivot.pt.coffee +80 -0
  227. data/public/node_modules/pivottable/pivot.ru.coffee +56 -0
  228. data/public/node_modules/pivottable/pivot.tr.coffee +80 -0
  229. data/public/node_modules/pivottable/pivottable.jquery.json +33 -0
  230. data/public/node_modules/pivottable/tests/boot.js +152 -0
  231. data/public/node_modules/pivottable/tests/index.html +35 -0
  232. data/public/node_modules/pivottable/tests/pivot_spec.coffee +458 -0
  233. data/public/vendor.js +5 -0
  234. metadata +232 -1
@@ -0,0 +1,2 @@
1
+ (function(){var e;(e=function(e){return"object"==typeof exports&&"object"==typeof module?e(require("jquery"),require("d3")):"function"==typeof define&&define.amd?define(["jquery","d3"],e):e(jQuery,d3)})(function(e,t){return e.pivotUtilities.d3_renderers={Treemap:function(n,i){var r,u,l,d,o,a,c,h,f,s,p,y,g;for(l={localeStrings:{},d3:{width:function(){return e(window).width()/1.4},height:function(){return e(window).height()/1.4}}},i=e.extend(l,i),h=e("<div>").css({width:"100%",height:"100%"}),s={name:"All",children:[]},r=function(e,t,n){var i,u,l,d,o,a;if(0===t.length)return void(e.value=n);for(null==e.children&&(e.children=[]),a=t.shift(),o=e.children,u=0,l=o.length;l>u;u++)if(i=o[u],i.name===a)return void r(i,t,n);return d={name:a},r(d,t,n),e.children.push(d)},c=n.getRowKeys(),o=0,a=c.length;a>o;o++)f=c[o],y=n.getAggregator(f,[]).value(),null!=y&&r(s,f,y);return u=t.scale.category10(),g=i.d3.width(),d=i.d3.height(),p=t.layout.treemap().size([g,d]).sticky(!0).value(function(e){return e.size}),t.select(h[0]).append("div").style("position","relative").style("width",g+"px").style("height",d+"px").datum(s).selectAll(".node").data(p.padding([15,0,0,0]).value(function(e){return e.value}).nodes).enter().append("div").attr("class","node").style("background",function(e){return null!=e.children?"lightgrey":u(e.name)}).text(function(e){return e.name}).call(function(){this.style("left",function(e){return e.x+"px"}).style("top",function(e){return e.y+"px"}).style("width",function(e){return Math.max(0,e.dx-1)+"px"}).style("height",function(e){return Math.max(0,e.dy-1)+"px"})}),h}}})}).call(this);
2
+ //# sourceMappingURL=d3_renderers.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/source/d3_renderers.coffee","d3_renderers.min.js"],"names":["callWithJQuery","pivotModule","exports","module","require","define","amd","jQuery","d3","$","pivotUtilities","d3_renderers","Treemap","pivotData","opts","addToTree","color","defaults","height","i","len","ref","result","rowKey","tree","treemap","value","width","localeStrings","window","extend","css","name","children","path","child","newChild","x","length","shift","push","getRowKeys","getAggregator","scale","category10","layout","size","sticky","d","select","append","style","datum","selectAll","data","padding","nodes","enter","attr","text","call","this","y","Math","max","dx","dy"],"mappings":"CAAA,WAAA,GAAAA,IAAAA,EAAiB,SAACC,GACd,MAAqB,gBAAXC,UAAyC,gBAAVC,QACrCF,EAAYG,QAAQ,UAAWA,QAAQ,OAClB,kBAAVC,SAAyBA,OAAOC,IAC3CD,QAAQ,SAAU,MAAOJ,GAGzBA,EAAYM,OAAQC,MAEb,SAACC,EAAGD,GCKf,MDHAC,GAAEC,eAAeC,cAAeC,QAAS,SAACC,EAAWC,GACjD,GAAAC,GAAAC,EAAAC,EAAAC,EAAAC,EAAAC,E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M,WAAY,YAClBA,MAAM,QAASxB,EAAQ,MACvBwB,MAAM,SAAUjC,EAAS,MAC7BkC,MAAM5B,GAAM6B,UAAU,SAClBC,KAAK7B,EAAQ8B,SAAS,GAAG,EAAE,EAAE,IAAI7B,MAAO,SAACsB,GCoBhD,MDpBsDA,GAAEtB,QAAQ8B,OAC7DC,QAAQP,OAAO,OACfQ,KAAK,QAAS,QACdP,MAAM,aAAc,SAACH,GAAM,MAAG,OAAAA,EAAAf,SAAiB,YAAiBjB,EAAMgC,EAAEhB,QACxE2B,KAAM,SAACX,GCwBV,MDxBgBA,GAAEhB,OACf4B,KAAK,WACEC,KAAKV,MAAM,OAAS,SAACH,GCyB7B,MDzBmCA,GAAEX,EAAE,OAC1Bc,MAAM,MAAS,SAACH,GC0B7B,MD1BmCA,GAAEc,EAAE,OAC1BX,MAAM,QAAS,SAACH,GC2B7B,MD3BmCe,MAAKC,IAAI,EAAGhB,EAAEiB,GAAK,GAAG,OAC5Cd,MAAM,SAAS,SAACH,GC4B7B,MD5BmCe,MAAKC,IAAI,EAAGhB,EAAEkB,GAAK,GAAG,SAGtD5C,QCiCZsC,KAAKC","file":"d3_renderers.min.js","sourcesContent":["callWithJQuery = (pivotModule) ->\n if typeof exports is \"object\" and typeof module is \"object\" # CommonJS\n pivotModule require(\"jquery\"), require(\"d3\")\n else if typeof define is \"function\" and define.amd # AMD\n define [\"jquery\", \"d3\"], pivotModule\n # Plain browser env\n else\n pivotModule jQuery, d3\n \ncallWithJQuery ($, d3) ->\n\n $.pivotUtilities.d3_renderers = Treemap: (pivotData, opts) ->\n defaults =\n localeStrings: {}\n d3:\n width: -> $(window).width() / 1.4\n height: -> $(window).height() / 1.4\n\n opts = $.extend defaults, opts\n\n\n result = $(\"<div>\").css(width: \"100%\", height: \"100%\")\n\n tree = name: \"All\", children: []\n addToTree = (tree, path, value) ->\n if path.length == 0\n tree.value = value\n return\n tree.children ?= []\n x = path.shift()\n for child in tree.children when child.name == x\n addToTree(child, path, value)\n return\n newChild = name: x\n addToTree(newChild, path, value)\n tree.children.push newChild\n\n for rowKey in pivotData.getRowKeys()\n value = pivotData.getAggregator(rowKey, []).value()\n if value?\n addToTree(tree, rowKey, value)\n\n color = d3.scale.category10()\n width = opts.d3.width()\n height = opts.d3.height()\n\n treemap = d3.layout.treemap()\n .size([width, height])\n .sticky(true)\n .value( (d) -> d.size )\n\n d3.select(result[0])\n .append(\"div\")\n .style(\"position\", \"relative\")\n .style(\"width\", width + \"px\")\n .style(\"height\", height + \"px\")\n .datum(tree).selectAll(\".node\")\n .data(treemap.padding([15,0,0,0]).value( (d) -> d.value ).nodes)\n .enter().append(\"div\")\n .attr(\"class\", \"node\")\n .style(\"background\", (d) -> if d.children? then \"lightgrey\" else color(d.name) )\n .text( (d) -> d.name )\n .call ->\n this.style(\"left\", (d) -> d.x+\"px\" )\n .style(\"top\", (d) -> d.y+\"px\" )\n .style(\"width\", (d) -> Math.max(0, d.dx - 1)+\"px\" )\n .style(\"height\",(d) -> Math.max(0, d.dy - 1)+\"px\" )\n return\n \n return result\n \n\n\n","(function() {\n var callWithJQuery;\n\n callWithJQuery = function(pivotModule) {\n if (typeof exports === \"object\" && typeof module === \"object\") {\n return pivotModule(require(\"jquery\"), require(\"d3\"));\n } else if (typeof define === \"function\" && define.amd) {\n return define([\"jquery\", \"d3\"], pivotModule);\n } else {\n return pivotModule(jQuery, d3);\n }\n };\n\n callWithJQuery(function($, d3) {\n return $.pivotUtilities.d3_renderers = {\n Treemap: function(pivotData, opts) {\n var addToTree, color, defaults, height, i, len, ref, result, rowKey, tree, treemap, value, width;\n defaults = {\n localeStrings: {},\n d3: {\n width: function() {\n return $(window).width() / 1.4;\n },\n height: function() {\n return $(window).height() / 1.4;\n }\n }\n };\n opts = $.extend(defaults, opts);\n result = $(\"<div>\").css({\n width: \"100%\",\n height: \"100%\"\n });\n tree = {\n name: \"All\",\n children: []\n };\n addToTree = function(tree, path, value) {\n var child, i, len, newChild, ref, x;\n if (path.length === 0) {\n tree.value = value;\n return;\n }\n if (tree.children == null) {\n tree.children = [];\n }\n x = path.shift();\n ref = tree.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (!(child.name === x)) {\n continue;\n }\n addToTree(child, path, value);\n return;\n }\n newChild = {\n name: x\n };\n addToTree(newChild, path, value);\n return tree.children.push(newChild);\n };\n ref = pivotData.getRowKeys();\n for (i = 0, len = ref.length; i < len; i++) {\n rowKey = ref[i];\n value = pivotData.getAggregator(rowKey, []).value();\n if (value != null) {\n addToTree(tree, rowKey, value);\n }\n }\n color = d3.scale.category10();\n width = opts.d3.width();\n height = opts.d3.height();\n treemap = d3.layout.treemap().size([width, height]).sticky(true).value(function(d) {\n return d.size;\n });\n d3.select(result[0]).append(\"div\").style(\"position\", \"relative\").style(\"width\", width + \"px\").style(\"height\", height + \"px\").datum(tree).selectAll(\".node\").data(treemap.padding([15, 0, 0, 0]).value(function(d) {\n return d.value;\n }).nodes).enter().append(\"div\").attr(\"class\", \"node\").style(\"background\", function(d) {\n if (d.children != null) {\n return \"lightgrey\";\n } else {\n return color(d.name);\n }\n }).text(function(d) {\n return d.name;\n }).call(function() {\n this.style(\"left\", function(d) {\n return d.x + \"px\";\n }).style(\"top\", function(d) {\n return d.y + \"px\";\n }).style(\"width\", function(d) {\n return Math.max(0, d.dx - 1) + \"px\";\n }).style(\"height\", function(d) {\n return Math.max(0, d.dy - 1) + \"px\";\n });\n });\n return result;\n }\n };\n });\n\n}).call(this);\n\n//# sourceMappingURL=d3_renderers.js.map\n"],"sourceRoot":"/source/"}
@@ -0,0 +1,80 @@
1
+ (function() {
2
+ var callWithJQuery;
3
+
4
+ callWithJQuery = function(pivotModule) {
5
+ if (typeof exports === "object" && typeof module === "object") {
6
+ return pivotModule(require("jquery"));
7
+ } else if (typeof define === "function" && define.amd) {
8
+ return define(["jquery"], pivotModule);
9
+ } else {
10
+ return pivotModule(jQuery);
11
+ }
12
+ };
13
+
14
+ callWithJQuery(function($) {
15
+ return $.pivotUtilities.export_renderers = {
16
+ "TSV Export": function(pivotData, opts) {
17
+ var agg, colAttrs, colKey, colKeys, defaults, i, j, k, l, len, len1, len2, len3, len4, len5, m, n, r, result, row, rowAttr, rowAttrs, rowKey, rowKeys, text;
18
+ defaults = {
19
+ localeStrings: {}
20
+ };
21
+ opts = $.extend(defaults, opts);
22
+ rowKeys = pivotData.getRowKeys();
23
+ if (rowKeys.length === 0) {
24
+ rowKeys.push([]);
25
+ }
26
+ colKeys = pivotData.getColKeys();
27
+ if (colKeys.length === 0) {
28
+ colKeys.push([]);
29
+ }
30
+ rowAttrs = pivotData.rowAttrs;
31
+ colAttrs = pivotData.colAttrs;
32
+ result = [];
33
+ row = [];
34
+ for (i = 0, len = rowAttrs.length; i < len; i++) {
35
+ rowAttr = rowAttrs[i];
36
+ row.push(rowAttr);
37
+ }
38
+ if (colKeys.length === 1 && colKeys[0].length === 0) {
39
+ row.push(pivotData.aggregatorName);
40
+ } else {
41
+ for (j = 0, len1 = colKeys.length; j < len1; j++) {
42
+ colKey = colKeys[j];
43
+ row.push(colKey.join("-"));
44
+ }
45
+ }
46
+ result.push(row);
47
+ for (k = 0, len2 = rowKeys.length; k < len2; k++) {
48
+ rowKey = rowKeys[k];
49
+ row = [];
50
+ for (l = 0, len3 = rowKey.length; l < len3; l++) {
51
+ r = rowKey[l];
52
+ row.push(r);
53
+ }
54
+ for (m = 0, len4 = colKeys.length; m < len4; m++) {
55
+ colKey = colKeys[m];
56
+ agg = pivotData.getAggregator(rowKey, colKey);
57
+ if (agg.value() != null) {
58
+ row.push(agg.value());
59
+ } else {
60
+ row.push("");
61
+ }
62
+ }
63
+ result.push(row);
64
+ }
65
+ text = "";
66
+ for (n = 0, len5 = result.length; n < len5; n++) {
67
+ r = result[n];
68
+ text += r.join("\t") + "\n";
69
+ }
70
+ return $("<textarea>").text(text).css({
71
+ width: ($(window).width() / 2) + "px",
72
+ height: ($(window).height() / 2) + "px"
73
+ });
74
+ }
75
+ };
76
+ });
77
+
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,CAAS,SAAS,CAAC,cAAnB,EADJ;SAAA,MAAA;AAGI,eAAA,2CAAA;;YACI,GAAG,CAAC,IAAJ,CAAS,MAAM,CAAC,IAAP,CAAY,GAAZ,CAAT;AADJ,WAHJ;;QAMA,MAAM,CAAC,IAAP,CAAY,GAAZ;AAEA,aAAA,2CAAA;;UACI,GAAA,GAAM;AACN,eAAA,0CAAA;;YACI,GAAG,CAAC,IAAJ,CAAS,CAAT;AADJ;AAGA,eAAA,2CAAA;;YACI,GAAA,GAAM,SAAS,CAAC,aAAV,CAAwB,MAAxB,EAAgC,MAAhC;YACN,IAAG,mBAAH;cACI,GAAG,CAAC,IAAJ,CAAS,GAAG,CAAC,KAAJ,CAAA,CAAT,EADJ;aAAA,MAAA;cAGI,GAAG,CAAC,IAAJ,CAAS,EAAT,EAHJ;;AAFJ;UAMA,MAAM,CAAC,IAAP,CAAY,GAAZ;AAXJ;QAYA,IAAA,GAAO;AACP,aAAA,0CAAA;;UACI,IAAA,IAAQ,CAAC,CAAC,IAAF,CAAO,IAAP,CAAA,GAAa;AADzB;AAGA,eAAO,CAAA,CAAE,YAAF,CAAe,CAAC,IAAhB,CAAqB,IAArB,CAA0B,CAAC,GAA3B,CACC;UAAA,KAAA,EAAO,CAAC,CAAA,CAAE,MAAF,CAAS,CAAC,KAAV,CAAA,CAAA,GAAoB,CAArB,CAAA,GAA0B,IAAjC;UACA,MAAA,EAAQ,CAAC,CAAA,CAAE,MAAF,CAAS,CAAC,MAAV,CAAA,CAAA,GAAqB,CAAtB,CAAA,GAA2B,IADnC;SADD;MA1CuC,CAAd;;EAFzB,CAAf;AATA","file":"export_renderers.js","sourceRoot":"/source/","sourcesContent":["callWithJQuery = (pivotModule) ->\n if typeof exports is \"object\" and typeof module is \"object\" # CommonJS\n pivotModule require(\"jquery\")\n else if typeof define is \"function\" and define.amd # AMD\n define [\"jquery\"], pivotModule\n # Plain browser env\n else\n pivotModule jQuery\n \ncallWithJQuery ($) ->\n\n $.pivotUtilities.export_renderers = \"TSV Export\": (pivotData, opts) ->\n defaults =\n localeStrings: {}\n\n opts = $.extend defaults, opts\n\n rowKeys = pivotData.getRowKeys()\n rowKeys.push [] if rowKeys.length == 0\n colKeys = pivotData.getColKeys()\n colKeys.push [] if colKeys.length == 0\n rowAttrs = pivotData.rowAttrs\n colAttrs = pivotData.colAttrs\n\n result = []\n\n row = []\n for rowAttr in rowAttrs\n row.push rowAttr\n if colKeys.length == 1 and colKeys[0].length == 0\n row.push pivotData.aggregatorName\n else\n for colKey in colKeys\n row.push colKey.join(\"-\")\n\n result.push row\n\n for rowKey in rowKeys\n row = []\n for r in rowKey\n row.push r\n\n for colKey in colKeys\n agg = pivotData.getAggregator(rowKey, colKey)\n if agg.value()?\n row.push agg.value()\n else\n row.push \"\"\n result.push row\n text = \"\"\n for r in result\n text += r.join(\"\\t\")+\"\\n\"\n \n return $(\"<textarea>\").text(text).css(\n width: ($(window).width() / 2) + \"px\", \n height: ($(window).height() / 2) + \"px\")\n \n"]}
@@ -0,0 +1,2 @@
1
+ (function(){var e;(e=function(e){return"object"==typeof exports&&"object"==typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){return e.pivotUtilities.export_renderers={"TSV Export":function(t,n){var r,o,h,u,i,l,g,s,p,f,a,c,d,w,x,y,j,v,m,q,A,b,K,S,C;for(i={localeStrings:{}},n=e.extend(i,n),S=t.getRowKeys(),0===S.length&&S.push([]),u=t.getColKeys(),0===u.length&&u.push([]),b=t.rowAttrs,o=t.colAttrs,m=[],q=[],l=0,f=b.length;f>l;l++)A=b[l],q.push(A);if(1===u.length&&0===u[0].length)q.push(t.aggregatorName);else for(g=0,a=u.length;a>g;g++)h=u[g],q.push(h.join("-"));for(m.push(q),s=0,c=S.length;c>s;s++){for(K=S[s],q=[],p=0,d=K.length;d>p;p++)v=K[p],q.push(v);for(y=0,w=u.length;w>y;y++)h=u[y],r=t.getAggregator(K,h),null!=r.value()?q.push(r.value()):q.push("");m.push(q)}for(C="",j=0,x=m.length;x>j;j++)v=m[j],C+=v.join(" ")+"\n";return e("<textarea>").text(C).css({width:e(window).width()/2+"px",height:e(window).height()/2+"px"})}}})}).call(this);
2
+ //# sourceMappingURL=export_renderers.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/source/export_renderers.coffee","export_renderers.min.js"],"names":["callWithJQuery","pivotModule","exports","module","require","define","amd","jQuery","$","pivotUtilities","export_renderers","TSV Export","pivotData","opts","agg","colAttrs","colKey","colKeys","defaults","i","j","k","l","len","len1","len2","len3","len4","len5","m","n","r","result","row","rowAttr","rowAttrs","rowKey","rowKeys","text","localeStrings","extend","getRowKeys","length","push","getColKeys","aggregatorName","join","getAggregator","value","css","width","window","height","call","this"],"mappings":"CAAA,WAAA,GAAAA,IAAAA,EAAiB,SAACC,GACd,MAAqB,gBAAXC,UAAyC,gBAAVC,QACrCF,EAAYG,QAAQ,WACC,kBAAVC,SAAyBA,OAAOC,IAC3CD,QAAQ,UAAWJ,GAGnBA,EAAYM,UAEL,SAACC,GCKZ,MDHAA,GAAEC,eAAeC,kBAAmBC,aAAc,SAACC,EAAWC,GAC1D,GAAAC,GAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,CAeA,KAfApB,GACIqB,kBAEJ1B,EAAOL,EAAEgC,OAAOtB,EAAUL,GAE1BwB,EAAUzB,EAAU6B,aACiB,IAAlBJ,EAAQK,QAA3BL,EAAQM,SACR1B,EAAUL,EAAUgC,aACiB,IAAlB3B,EAAQyB,QAA3BzB,EAAQ0B,SACRR,EAAWvB,EAAUuB,SACrBpB,EAAWH,EAAUG,SAErBiB,KAEAC,KACAd,EAAA,EAAAI,EAAAY,EAAAO,OAAAnB,EAAAJ,EAAAA,ICOEe,EAAUC,EAAShB,GDNjBc,EAAIU,KAAKT,EACb,IAAqB,IAAlBjB,EAAQyB,QAAqC,IAArBzB,EAAQ,GAAGyB,OAClCT,EAAIU,KAAK/B,EAAUiC,oBAEnB,KAAAzB,EAAA,EAAAI,EAAAP,EAAAyB,OAAAlB,EAAAJ,EAAAA,ICSAJ,EAASC,EAAQG,GDRba,EAAIU,KAAK3B,EAAO8B,KAAK,KAI7B,KAFAd,EAAOW,KAAKV,GAEZZ,EAAA,EAAAI,EAAAY,EAAAK,OAAAjB,EAAAJ,EAAAA,IAAA,CAEI,ICQFe,EAASC,EAAQhB,GDTfY,KACAX,EAAA,EAAAI,EAAAU,EAAAM,OAAAhB,EAAAJ,EAAAA,ICWAS,EAAIK,EAAOd,GDVPW,EAAIU,KAAKZ,EAEb,KAAAF,EAAA,EAAAF,EAAAV,EAAAyB,OAAAf,EAAAE,EAAAA,ICYAb,EAASC,EAAQY,GDXbf,EAAMF,EAAUmC,cAAcX,EAAQpB,GACnC,MAAAF,EAAAkC,QACCf,EAAIU,KAAK7B,EAAIkC,SAEbf,EAAIU,KAAK,GACjBX,GAAOW,KAAKV,GAEhB,IADAK,EAAO,GACPR,EAAA,EAAAF,EAAAI,EAAAU,OAAAd,EAAAE,EAAAA,ICgBEC,EAAIC,EAAOF,GDfTQ,GAAQP,EAAEe,KAAK,KAAM,IAEzB,OAAOtC,GAAE,cAAc8B,KAAKA,GAAMW,KAC1BC,MAAQ1C,EAAE2C,QAAQD,QAAU,EAAK,KACjCE,OAAS5C,EAAE2C,QAAQC,SAAW,EAAK,aCsBhDC,KAAKC","file":"export_renderers.min.js","sourcesContent":["callWithJQuery = (pivotModule) ->\n if typeof exports is \"object\" and typeof module is \"object\" # CommonJS\n pivotModule require(\"jquery\")\n else if typeof define is \"function\" and define.amd # AMD\n define [\"jquery\"], pivotModule\n # Plain browser env\n else\n pivotModule jQuery\n \ncallWithJQuery ($) ->\n\n $.pivotUtilities.export_renderers = \"TSV Export\": (pivotData, opts) ->\n defaults =\n localeStrings: {}\n\n opts = $.extend defaults, opts\n\n rowKeys = pivotData.getRowKeys()\n rowKeys.push [] if rowKeys.length == 0\n colKeys = pivotData.getColKeys()\n colKeys.push [] if colKeys.length == 0\n rowAttrs = pivotData.rowAttrs\n colAttrs = pivotData.colAttrs\n\n result = []\n\n row = []\n for rowAttr in rowAttrs\n row.push rowAttr\n if colKeys.length == 1 and colKeys[0].length == 0\n row.push pivotData.aggregatorName\n else\n for colKey in colKeys\n row.push colKey.join(\"-\")\n\n result.push row\n\n for rowKey in rowKeys\n row = []\n for r in rowKey\n row.push r\n\n for colKey in colKeys\n agg = pivotData.getAggregator(rowKey, colKey)\n if agg.value()?\n row.push agg.value()\n else\n row.push \"\"\n result.push row\n text = \"\"\n for r in result\n text += r.join(\"\\t\")+\"\\n\"\n \n return $(\"<textarea>\").text(text).css(\n width: ($(window).width() / 2) + \"px\", \n height: ($(window).height() / 2) + \"px\")\n \n","(function() {\n var callWithJQuery;\n\n callWithJQuery = function(pivotModule) {\n if (typeof exports === \"object\" && typeof module === \"object\") {\n return pivotModule(require(\"jquery\"));\n } else if (typeof define === \"function\" && define.amd) {\n return define([\"jquery\"], pivotModule);\n } else {\n return pivotModule(jQuery);\n }\n };\n\n callWithJQuery(function($) {\n return $.pivotUtilities.export_renderers = {\n \"TSV Export\": function(pivotData, opts) {\n var agg, colAttrs, colKey, colKeys, defaults, i, j, k, l, len, len1, len2, len3, len4, len5, m, n, r, result, row, rowAttr, rowAttrs, rowKey, rowKeys, text;\n defaults = {\n localeStrings: {}\n };\n opts = $.extend(defaults, opts);\n rowKeys = pivotData.getRowKeys();\n if (rowKeys.length === 0) {\n rowKeys.push([]);\n }\n colKeys = pivotData.getColKeys();\n if (colKeys.length === 0) {\n colKeys.push([]);\n }\n rowAttrs = pivotData.rowAttrs;\n colAttrs = pivotData.colAttrs;\n result = [];\n row = [];\n for (i = 0, len = rowAttrs.length; i < len; i++) {\n rowAttr = rowAttrs[i];\n row.push(rowAttr);\n }\n if (colKeys.length === 1 && colKeys[0].length === 0) {\n row.push(pivotData.aggregatorName);\n } else {\n for (j = 0, len1 = colKeys.length; j < len1; j++) {\n colKey = colKeys[j];\n row.push(colKey.join(\"-\"));\n }\n }\n result.push(row);\n for (k = 0, len2 = rowKeys.length; k < len2; k++) {\n rowKey = rowKeys[k];\n row = [];\n for (l = 0, len3 = rowKey.length; l < len3; l++) {\n r = rowKey[l];\n row.push(r);\n }\n for (m = 0, len4 = colKeys.length; m < len4; m++) {\n colKey = colKeys[m];\n agg = pivotData.getAggregator(rowKey, colKey);\n if (agg.value() != null) {\n row.push(agg.value());\n } else {\n row.push(\"\");\n }\n }\n result.push(row);\n }\n text = \"\";\n for (n = 0, len5 = result.length; n < len5; n++) {\n r = result[n];\n text += r.join(\"\\t\") + \"\\n\";\n }\n return $(\"<textarea>\").text(text).css({\n width: ($(window).width() / 2) + \"px\",\n height: ($(window).height() / 2) + \"px\"\n });\n }\n };\n });\n\n}).call(this);\n\n//# sourceMappingURL=export_renderers.js.map\n"],"sourceRoot":"/source/"}
@@ -0,0 +1,183 @@
1
+ (function() {
2
+ var callWithJQuery;
3
+
4
+ callWithJQuery = function(pivotModule) {
5
+ if (typeof exports === "object" && typeof module === "object") {
6
+ return pivotModule(require("jquery"));
7
+ } else if (typeof define === "function" && define.amd) {
8
+ return define(["jquery"], pivotModule);
9
+ } else {
10
+ return pivotModule(jQuery);
11
+ }
12
+ };
13
+
14
+ callWithJQuery(function($) {
15
+ var makeGoogleChart;
16
+ makeGoogleChart = function(chartType, extraOptions) {
17
+ return function(pivotData, opts) {
18
+ var agg, base, base1, colKey, colKeys, dataArray, dataTable, defaults, fullAggName, groupByTitle, h, hAxisTitle, headers, i, j, len, len1, numCharsInHAxis, options, ref, result, row, rowKey, rowKeys, title, tree2, vAxisTitle, val, wrapper, x, y;
19
+ defaults = {
20
+ localeStrings: {
21
+ vs: "vs",
22
+ by: "by"
23
+ },
24
+ gchart: {}
25
+ };
26
+ opts = $.extend(true, defaults, opts);
27
+ if ((base = opts.gchart).width == null) {
28
+ base.width = window.innerWidth / 1.4;
29
+ }
30
+ if ((base1 = opts.gchart).height == null) {
31
+ base1.height = window.innerHeight / 1.4;
32
+ }
33
+ rowKeys = pivotData.getRowKeys();
34
+ if (rowKeys.length === 0) {
35
+ rowKeys.push([]);
36
+ }
37
+ colKeys = pivotData.getColKeys();
38
+ if (colKeys.length === 0) {
39
+ colKeys.push([]);
40
+ }
41
+ fullAggName = pivotData.aggregatorName;
42
+ if (pivotData.valAttrs.length) {
43
+ fullAggName += "(" + (pivotData.valAttrs.join(", ")) + ")";
44
+ }
45
+ headers = (function() {
46
+ var i, len, results;
47
+ results = [];
48
+ for (i = 0, len = rowKeys.length; i < len; i++) {
49
+ h = rowKeys[i];
50
+ results.push(h.join("-"));
51
+ }
52
+ return results;
53
+ })();
54
+ headers.unshift("");
55
+ numCharsInHAxis = 0;
56
+ if (chartType === "ScatterChart") {
57
+ dataArray = [];
58
+ ref = pivotData.tree;
59
+ for (y in ref) {
60
+ tree2 = ref[y];
61
+ for (x in tree2) {
62
+ agg = tree2[x];
63
+ dataArray.push([parseFloat(x), parseFloat(y), fullAggName + ": \n" + agg.format(agg.value())]);
64
+ }
65
+ }
66
+ dataTable = new google.visualization.DataTable();
67
+ dataTable.addColumn('number', pivotData.colAttrs.join("-"));
68
+ dataTable.addColumn('number', pivotData.rowAttrs.join("-"));
69
+ dataTable.addColumn({
70
+ type: "string",
71
+ role: "tooltip"
72
+ });
73
+ dataTable.addRows(dataArray);
74
+ hAxisTitle = pivotData.colAttrs.join("-");
75
+ vAxisTitle = pivotData.rowAttrs.join("-");
76
+ title = "";
77
+ } else {
78
+ dataArray = [headers];
79
+ for (i = 0, len = colKeys.length; i < len; i++) {
80
+ colKey = colKeys[i];
81
+ row = [colKey.join("-")];
82
+ numCharsInHAxis += row[0].length;
83
+ for (j = 0, len1 = rowKeys.length; j < len1; j++) {
84
+ rowKey = rowKeys[j];
85
+ agg = pivotData.getAggregator(rowKey, colKey);
86
+ if (agg.value() != null) {
87
+ val = agg.value();
88
+ if ($.isNumeric(val)) {
89
+ if (val < 1) {
90
+ row.push(parseFloat(val.toPrecision(3)));
91
+ } else {
92
+ row.push(parseFloat(val.toFixed(3)));
93
+ }
94
+ } else {
95
+ row.push(val);
96
+ }
97
+ } else {
98
+ row.push(null);
99
+ }
100
+ }
101
+ dataArray.push(row);
102
+ }
103
+ dataTable = google.visualization.arrayToDataTable(dataArray);
104
+ title = vAxisTitle = fullAggName;
105
+ hAxisTitle = pivotData.colAttrs.join("-");
106
+ if (hAxisTitle !== "") {
107
+ title += " " + opts.localeStrings.vs + " " + hAxisTitle;
108
+ }
109
+ groupByTitle = pivotData.rowAttrs.join("-");
110
+ if (groupByTitle !== "") {
111
+ title += " " + opts.localeStrings.by + " " + groupByTitle;
112
+ }
113
+ }
114
+ options = {
115
+ title: title,
116
+ hAxis: {
117
+ title: hAxisTitle,
118
+ slantedText: numCharsInHAxis > 50
119
+ },
120
+ vAxis: {
121
+ title: vAxisTitle
122
+ },
123
+ tooltip: {
124
+ textStyle: {
125
+ fontName: 'Arial',
126
+ fontSize: 12
127
+ }
128
+ }
129
+ };
130
+ if (chartType === "ColumnChart") {
131
+ options.vAxis.minValue = 0;
132
+ }
133
+ if (chartType === "ScatterChart") {
134
+ options.legend = {
135
+ position: "none"
136
+ };
137
+ options.chartArea = {
138
+ 'width': '80%',
139
+ 'height': '80%'
140
+ };
141
+ } else if (dataArray[0].length === 2 && dataArray[0][1] === "") {
142
+ options.legend = {
143
+ position: "none"
144
+ };
145
+ }
146
+ $.extend(options, opts.gchart, extraOptions);
147
+ result = $("<div>").css({
148
+ width: "100%",
149
+ height: "100%"
150
+ });
151
+ wrapper = new google.visualization.ChartWrapper({
152
+ dataTable: dataTable,
153
+ chartType: chartType,
154
+ options: options
155
+ });
156
+ wrapper.draw(result[0]);
157
+ result.bind("dblclick", function() {
158
+ var editor;
159
+ editor = new google.visualization.ChartEditor();
160
+ google.visualization.events.addListener(editor, 'ok', function() {
161
+ return editor.getChartWrapper().draw(result[0]);
162
+ });
163
+ return editor.openDialog(wrapper);
164
+ });
165
+ return result;
166
+ };
167
+ };
168
+ return $.pivotUtilities.gchart_renderers = {
169
+ "Line Chart": makeGoogleChart("LineChart"),
170
+ "Bar Chart": makeGoogleChart("ColumnChart"),
171
+ "Stacked Bar Chart": makeGoogleChart("ColumnChart", {
172
+ isStacked: true
173
+ }),
174
+ "Area Chart": makeGoogleChart("AreaChart", {
175
+ isStacked: true
176
+ }),
177
+ "Scatter Chart": makeGoogleChart("ScatterChart")
178
+ };
179
+ });
180
+
181
+ }).call(this);
182
+
183
+ //# sourceMappingURL=gchart_renderers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["gchart_renderers.coffee"],"names":[],"mappings":"AAAA;AAAA,MAAA;;EAAA,cAAA,GAAiB,SAAC,WAAD;IACb,IAAG,OAAO,OAAP,KAAkB,QAAlB,IAA+B,OAAO,MAAP,KAAiB,QAAnD;aACI,WAAA,CAAY,OAAA,CAAQ,QAAR,CAAZ,EADJ;KAAA,MAEK,IAAG,OAAO,MAAP,KAAiB,UAAjB,IAAgC,MAAM,CAAC,GAA1C;aACD,MAAA,CAAO,CAAC,QAAD,CAAP,EAAmB,WAAnB,EADC;KAAA,MAAA;aAID,WAAA,CAAY,MAAZ,EAJC;;EAHQ;;EASjB,cAAA,CAAe,SAAC,CAAD;AAEX,QAAA;IAAA,eAAA,GAAkB,SAAC,SAAD,EAAY,YAAZ;aAA6B,SAAC,SAAD,EAAY,IAAZ;AAC3C,YAAA;QAAA,QAAA,GACI;UAAA,aAAA,EACI;YAAA,EAAA,EAAI,IAAJ;YACA,EAAA,EAAI,IADJ;WADJ;UAGA,MAAA,EAAQ,EAHR;;QAKJ,IAAA,GAAO,CAAC,CAAC,MAAF,CAAS,IAAT,EAAe,QAAf,EAAyB,IAAzB;;cACI,CAAC,QAAS,MAAM,CAAC,UAAP,GAAoB;;;eAC9B,CAAC,SAAU,MAA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,WAAA,SAAZ;UAAuB,SAAA,OAAvB;SAAlC;QACd,OAAO,CAAC,IAAR,CAAa,MAAO,CAAA,CAAA,CAApB;QACA,MAAM,CAAC,IAAP,CAAY,UAAZ,EAAwB,SAAA;AACpB,cAAA;UAAA,MAAA,GAAa,IAAA,MAAM,CAAC,aAAa,CAAC,WAArB,CAAA;UACb,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,WAA5B,CAAwC,MAAxC,EAAgD,IAAhD,EAAsD,SAAA;mBAClD,MAAM,CAAC,eAAP,CAAA,CAAwB,CAAC,IAAzB,CAA8B,MAAO,CAAA,CAAA,CAArC;UADkD,CAAtD;iBAEA,MAAM,CAAC,UAAP,CAAkB,OAAlB;QAJoB,CAAxB;AAKA,eAAO;MA5FoC;IAA7B;WA8FlB,CAAC,CAAC,cAAc,CAAC,gBAAjB,GACI;MAAA,YAAA,EAAc,eAAA,CAAgB,WAAhB,CAAd;MACA,WAAA,EAAa,eAAA,CAAgB,aAAhB,CADb;MAEA,mBAAA,EAAqB,eAAA,CAAgB,aAAhB,EAA+B;QAAA,SAAA,EAAW,IAAX;OAA/B,CAFrB;MAGA,YAAA,EAAc,eAAA,CAAgB,WAAhB,EAA6B;QAAA,SAAA,EAAW,IAAX;OAA7B,CAHd;MAIA,eAAA,EAAiB,eAAA,CAAgB,cAAhB,CAJjB;;EAjGO,CAAf;AATA","file":"gchart_renderers.js","sourceRoot":"/source/","sourcesContent":["callWithJQuery = (pivotModule) ->\n if typeof exports is \"object\" and typeof module is \"object\" # CommonJS\n pivotModule require(\"jquery\")\n else if typeof define is \"function\" and define.amd # AMD\n define [\"jquery\"], pivotModule\n # Plain browser env\n else\n pivotModule jQuery\n \ncallWithJQuery ($) ->\n\n makeGoogleChart = (chartType, extraOptions) -> (pivotData, opts) ->\n defaults =\n localeStrings:\n vs: \"vs\"\n by: \"by\"\n gchart: {}\n\n opts = $.extend true, defaults, opts\n opts.gchart.width ?= window.innerWidth / 1.4\n opts.gchart.height ?= window.innerHeight / 1.4\n\n rowKeys = pivotData.getRowKeys()\n rowKeys.push [] if rowKeys.length == 0\n colKeys = pivotData.getColKeys()\n colKeys.push [] if colKeys.length == 0\n fullAggName = pivotData.aggregatorName \n if pivotData.valAttrs.length\n fullAggName += \"(#{pivotData.valAttrs.join(\", \")})\"\n headers = (h.join(\"-\") for h in rowKeys)\n headers.unshift \"\"\n\n numCharsInHAxis = 0\n if chartType == \"ScatterChart\"\n dataArray = []\n for y, tree2 of pivotData.tree\n for x, agg of tree2\n dataArray.push [\n parseFloat(x),\n parseFloat(y),\n fullAggName+\": \\n\"+agg.format(agg.value())\n ]\n dataTable = new google.visualization.DataTable()\n dataTable.addColumn 'number', pivotData.colAttrs.join(\"-\")\n dataTable.addColumn 'number', pivotData.rowAttrs.join(\"-\") \n dataTable.addColumn type: \"string\", role: \"tooltip\"\n dataTable.addRows dataArray\n hAxisTitle = pivotData.colAttrs.join(\"-\")\n vAxisTitle = pivotData.rowAttrs.join(\"-\")\n title = \"\"\n else\n dataArray = [headers]\n for colKey in colKeys\n row = [colKey.join(\"-\")]\n numCharsInHAxis += row[0].length\n for rowKey in rowKeys\n agg = pivotData.getAggregator(rowKey, colKey)\n if agg.value()?\n val = agg.value()\n if $.isNumeric val\n if val < 1\n row.push parseFloat(val.toPrecision(3))\n else\n row.push parseFloat(val.toFixed(3))\n else\n row.push val\n else row.push null\n dataArray.push row\n\n dataTable = google.visualization.arrayToDataTable(dataArray)\n\n title = vAxisTitle = fullAggName\n hAxisTitle = pivotData.colAttrs.join(\"-\")\n title += \" #{opts.localeStrings.vs} #{hAxisTitle}\" if hAxisTitle != \"\"\n groupByTitle = pivotData.rowAttrs.join(\"-\")\n title += \" #{opts.localeStrings.by} #{groupByTitle}\" if groupByTitle != \"\"\n\n options = \n title: title\n hAxis: {title: hAxisTitle, slantedText: numCharsInHAxis > 50}\n vAxis: {title: vAxisTitle}\n tooltip: { textStyle: { fontName: 'Arial', fontSize: 12 } }\n\n if chartType == \"ColumnChart\"\n options.vAxis.minValue = 0\n\n if chartType == \"ScatterChart\"\n options.legend = position: \"none\"\n options.chartArea = {'width': '80%', 'height': '80%'}\n\n else if dataArray[0].length == 2 and dataArray[0][1] == \"\"\n options.legend = position: \"none\"\n \n $.extend options, opts.gchart, extraOptions\n\n result = $(\"<div>\").css(width: \"100%\", height: \"100%\")\n wrapper = new google.visualization.ChartWrapper {dataTable, chartType, options}\n wrapper.draw(result[0]) \n result.bind \"dblclick\", -> \n editor = new google.visualization.ChartEditor()\n google.visualization.events.addListener editor, 'ok', -> \n editor.getChartWrapper().draw(result[0])\n editor.openDialog(wrapper)\n return result\n\n $.pivotUtilities.gchart_renderers = \n \"Line Chart\": makeGoogleChart(\"LineChart\")\n \"Bar Chart\": makeGoogleChart(\"ColumnChart\")\n \"Stacked Bar Chart\": makeGoogleChart(\"ColumnChart\", isStacked: true)\n \"Area Chart\": makeGoogleChart(\"AreaChart\", isStacked: true)\n \"Scatter Chart\": makeGoogleChart(\"ScatterChart\")\n"]}
@@ -0,0 +1,2 @@
1
+ (function(){var t;(t=function(t){return"object"==typeof exports&&"object"==typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){var e;return e=function(e,r){return function(n,a){var o,i,l,h,s,u,g,d,c,p,f,v,C,w,A,m,y,j,b,S,x,z,T,k,F,q,D,L,N,W,B;if(d={localeStrings:{vs:"vs",by:"by"},gchart:{}},a=t.extend(!0,d,a),null==(i=a.gchart).width&&(i.width=window.innerWidth/1.4),null==(l=a.gchart).height&&(l.height=window.innerHeight/1.4),k=n.getRowKeys(),0===k.length&&k.push([]),s=n.getColKeys(),0===s.length&&s.push([]),c=n.aggregatorName,n.valAttrs.length&&(c+="("+n.valAttrs.join(", ")+")"),C=function(){var t,e,r;for(r=[],t=0,e=k.length;e>t;t++)f=k[t],r.push(f.join("-"));return r}(),C.unshift(""),j=0,"ScatterChart"===e){u=[],S=n.tree;for(B in S){q=S[B];for(W in q)o=q[W],u.push([parseFloat(W),parseFloat(B),c+": \n"+o.format(o.value())])}g=new google.visualization.DataTable,g.addColumn("number",n.colAttrs.join("-")),g.addColumn("number",n.rowAttrs.join("-")),g.addColumn({type:"string",role:"tooltip"}),g.addRows(u),v=n.colAttrs.join("-"),D=n.rowAttrs.join("-"),F=""}else{for(u=[C],w=0,m=s.length;m>w;w++){for(h=s[w],z=[h.join("-")],j+=z[0].length,A=0,y=k.length;y>A;A++)T=k[A],o=n.getAggregator(T,h),null!=o.value()?(L=o.value(),t.isNumeric(L)?1>L?z.push(parseFloat(L.toPrecision(3))):z.push(parseFloat(L.toFixed(3))):z.push(L)):z.push(null);u.push(z)}g=google.visualization.arrayToDataTable(u),F=D=c,v=n.colAttrs.join("-"),""!==v&&(F+=" "+a.localeStrings.vs+" "+v),p=n.rowAttrs.join("-"),""!==p&&(F+=" "+a.localeStrings.by+" "+p)}return b={title:F,hAxis:{title:v,slantedText:j>50},vAxis:{title:D},tooltip:{textStyle:{fontName:"Arial",fontSize:12}}},"ColumnChart"===e&&(b.vAxis.minValue=0),"ScatterChart"===e?(b.legend={position:"none"},b.chartArea={width:"80%",height:"80%"}):2===u[0].length&&""===u[0][1]&&(b.legend={position:"none"}),t.extend(b,a.gchart,r),x=t("<div>").css({width:"100%",height:"100%"}),N=new google.visualization.ChartWrapper({dataTable:g,chartType:e,options:b}),N.draw(x[0]),x.bind("dblclick",function(){var t;return t=new google.visualization.ChartEditor,google.visualization.events.addListener(t,"ok",function(){return t.getChartWrapper().draw(x[0])}),t.openDialog(N)}),x}},t.pivotUtilities.gchart_renderers={"Line Chart":e("LineChart"),"Bar Chart":e("ColumnChart"),"Stacked Bar Chart":e("ColumnChart",{isStacked:!0}),"Area Chart":e("AreaChart",{isStacked:!0}),"Scatter Chart":e("ScatterChart")}})}).call(this);
2
+ //# sourceMappingURL=gchart_renderers.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/source/gchart_renderers.coffee","gchart_renderers.min.js"],"names":["callWithJQuery","pivotModule","exports","module","require","define","amd","jQuery","$","makeGoogleChart","chartType","extraOptions","pivotData","opts","agg","base","base1","colKey","colKeys","dataArray","dataTable","defaults","fullAggName","groupByTitle","h","hAxisTitle","headers","i","j","len","len1","numCharsInHAxis","options","ref","result","row","rowKey","rowKeys","title","tree2","vAxisTitle","val","wrapper","x","y","localeStrings","vs","by","gchart","extend","width","window","innerWidth","height","innerHeight","getRowKeys","length","push","getColKeys","aggregatorName","valAttrs","join","results","unshift","tree","parseFloat","format","value","google","visualization","DataTable","addColumn","colAttrs","rowAttrs","type","role","addRows","getAggregator","isNumeric","toPrecision","toFixed","arrayToDataTable","hAxis","slantedText","vAxis","tooltip","textStyle","fontName","fontSize","minValue","legend","position","chartArea","css","ChartWrapper","draw","bind","editor","ChartEditor","events","addListener","getChartWrapper","openDialog","pivotUtilities","gchart_renderers","Line Chart","Bar Chart","Stacked Bar Chart","isStacked","Area Chart","Scatter Chart","call","this"],"mappings":"CAAA,WAAA,GAAAA,IAAAA,EAAiB,SAACC,GACd,MAAqB,gBAAXC,UAAyC,gBAAVC,QACrCF,EAAYG,QAAQ,WACC,kBAAVC,SAAyBA,OAAOC,IAC3CD,QAAQ,UAAWJ,GAGnBA,EAAYM,UAEL,SAACC,GAEZ,GAAAC,EC4JA,OD5JAA,GAAkB,SAACC,EAAWC,GCK5B,MDL6C,UAACC,EAAWC,GACvD,GAAAC,GAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,CAqBA,IArBAvB,GACIwB,eACIC,GAAI,KACJC,GAAI,MACRC,WAEJnC,EAAOL,EAAEyC,QAAO,EAAM5B,EAAUR,GCQE,OAA7BE,EAAOF,EAAKmC,QAAQE,QACvBnC,EDRUmC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,UAAAA,EAAWV,UAAAA,EAAWsB,QAAAA,IACvEU,EAAQqD,KAAK7D,EAAO,IACpBA,EAAO8D,KAAK,WAAY,WACpB,GAAAC,EC+DF,OD/DEA,GAAa,GAAA7B,QAAOC,cAAc6B,YAClC9B,OAAOC,cAAc8B,OAAOC,YAAYH,EAAQ,KAAM,WC4DtD,MD3DIA,GAAOI,kBAAkBN,KAAK7D,EAAO,MACzC+D,EAAOK,WAAW5D,KACfR,IAEX1B,EAAE+F,eAAeC,kBACbC,aAAchG,EAAgB,aAC9BiG,YAAajG,EAAgB,eAC7BkG,oBAAqBlG,EAAgB,eAAemG,WAAW,IAC/DC,aAAcpG,EAAgB,aAAamG,WAAW,IACtDE,gBAAiBrG,EAAgB,qBCsEtCsG,KAAKC","file":"gchart_renderers.min.js","sourcesContent":["callWithJQuery = (pivotModule) ->\n if typeof exports is \"object\" and typeof module is \"object\" # CommonJS\n pivotModule require(\"jquery\")\n else if typeof define is \"function\" and define.amd # AMD\n define [\"jquery\"], pivotModule\n # Plain browser env\n else\n pivotModule jQuery\n \ncallWithJQuery ($) ->\n\n makeGoogleChart = (chartType, extraOptions) -> (pivotData, opts) ->\n defaults =\n localeStrings:\n vs: \"vs\"\n by: \"by\"\n gchart: {}\n\n opts = $.extend true, defaults, opts\n opts.gchart.width ?= window.innerWidth / 1.4\n opts.gchart.height ?= window.innerHeight / 1.4\n\n rowKeys = pivotData.getRowKeys()\n rowKeys.push [] if rowKeys.length == 0\n colKeys = pivotData.getColKeys()\n colKeys.push [] if colKeys.length == 0\n fullAggName = pivotData.aggregatorName \n if pivotData.valAttrs.length\n fullAggName += \"(#{pivotData.valAttrs.join(\", \")})\"\n headers = (h.join(\"-\") for h in rowKeys)\n headers.unshift \"\"\n\n numCharsInHAxis = 0\n if chartType == \"ScatterChart\"\n dataArray = []\n for y, tree2 of pivotData.tree\n for x, agg of tree2\n dataArray.push [\n parseFloat(x),\n parseFloat(y),\n fullAggName+\": \\n\"+agg.format(agg.value())\n ]\n dataTable = new google.visualization.DataTable()\n dataTable.addColumn 'number', pivotData.colAttrs.join(\"-\")\n dataTable.addColumn 'number', pivotData.rowAttrs.join(\"-\") \n dataTable.addColumn type: \"string\", role: \"tooltip\"\n dataTable.addRows dataArray\n hAxisTitle = pivotData.colAttrs.join(\"-\")\n vAxisTitle = pivotData.rowAttrs.join(\"-\")\n title = \"\"\n else\n dataArray = [headers]\n for colKey in colKeys\n row = [colKey.join(\"-\")]\n numCharsInHAxis += row[0].length\n for rowKey in rowKeys\n agg = pivotData.getAggregator(rowKey, colKey)\n if agg.value()?\n val = agg.value()\n if $.isNumeric val\n if val < 1\n row.push parseFloat(val.toPrecision(3))\n else\n row.push parseFloat(val.toFixed(3))\n else\n row.push val\n else row.push null\n dataArray.push row\n\n dataTable = google.visualization.arrayToDataTable(dataArray)\n\n title = vAxisTitle = fullAggName\n hAxisTitle = pivotData.colAttrs.join(\"-\")\n title += \" #{opts.localeStrings.vs} #{hAxisTitle}\" if hAxisTitle != \"\"\n groupByTitle = pivotData.rowAttrs.join(\"-\")\n title += \" #{opts.localeStrings.by} #{groupByTitle}\" if groupByTitle != \"\"\n\n options = \n title: title\n hAxis: {title: hAxisTitle, slantedText: numCharsInHAxis > 50}\n vAxis: {title: vAxisTitle}\n tooltip: { textStyle: { fontName: 'Arial', fontSize: 12 } }\n\n if chartType == \"ColumnChart\"\n options.vAxis.minValue = 0\n\n if chartType == \"ScatterChart\"\n options.legend = position: \"none\"\n options.chartArea = {'width': '80%', 'height': '80%'}\n\n else if dataArray[0].length == 2 and dataArray[0][1] == \"\"\n options.legend = position: \"none\"\n \n $.extend options, opts.gchart, extraOptions\n\n result = $(\"<div>\").css(width: \"100%\", height: \"100%\")\n wrapper = new google.visualization.ChartWrapper {dataTable, chartType, options}\n wrapper.draw(result[0]) \n result.bind \"dblclick\", -> \n editor = new google.visualization.ChartEditor()\n google.visualization.events.addListener editor, 'ok', -> \n editor.getChartWrapper().draw(result[0])\n editor.openDialog(wrapper)\n return result\n\n $.pivotUtilities.gchart_renderers = \n \"Line Chart\": makeGoogleChart(\"LineChart\")\n \"Bar Chart\": makeGoogleChart(\"ColumnChart\")\n \"Stacked Bar Chart\": makeGoogleChart(\"ColumnChart\", isStacked: true)\n \"Area Chart\": makeGoogleChart(\"AreaChart\", isStacked: true)\n \"Scatter Chart\": makeGoogleChart(\"ScatterChart\")\n","(function() {\n var callWithJQuery;\n\n callWithJQuery = function(pivotModule) {\n if (typeof exports === \"object\" && typeof module === \"object\") {\n return pivotModule(require(\"jquery\"));\n } else if (typeof define === \"function\" && define.amd) {\n return define([\"jquery\"], pivotModule);\n } else {\n return pivotModule(jQuery);\n }\n };\n\n callWithJQuery(function($) {\n var makeGoogleChart;\n makeGoogleChart = function(chartType, extraOptions) {\n return function(pivotData, opts) {\n var agg, base, base1, colKey, colKeys, dataArray, dataTable, defaults, fullAggName, groupByTitle, h, hAxisTitle, headers, i, j, len, len1, numCharsInHAxis, options, ref, result, row, rowKey, rowKeys, title, tree2, vAxisTitle, val, wrapper, x, y;\n defaults = {\n localeStrings: {\n vs: \"vs\",\n by: \"by\"\n },\n gchart: {}\n };\n opts = $.extend(true, defaults, opts);\n if ((base = opts.gchart).width == null) {\n base.width = window.innerWidth / 1.4;\n }\n if ((base1 = opts.gchart).height == null) {\n base1.height = window.innerHeight / 1.4;\n }\n rowKeys = pivotData.getRowKeys();\n if (rowKeys.length === 0) {\n rowKeys.push([]);\n }\n colKeys = pivotData.getColKeys();\n if (colKeys.length === 0) {\n colKeys.push([]);\n }\n fullAggName = pivotData.aggregatorName;\n if (pivotData.valAttrs.length) {\n fullAggName += \"(\" + (pivotData.valAttrs.join(\", \")) + \")\";\n }\n headers = (function() {\n var i, len, results;\n results = [];\n for (i = 0, len = rowKeys.length; i < len; i++) {\n h = rowKeys[i];\n results.push(h.join(\"-\"));\n }\n return results;\n })();\n headers.unshift(\"\");\n numCharsInHAxis = 0;\n if (chartType === \"ScatterChart\") {\n dataArray = [];\n ref = pivotData.tree;\n for (y in ref) {\n tree2 = ref[y];\n for (x in tree2) {\n agg = tree2[x];\n dataArray.push([parseFloat(x), parseFloat(y), fullAggName + \": \\n\" + agg.format(agg.value())]);\n }\n }\n dataTable = new google.visualization.DataTable();\n dataTable.addColumn('number', pivotData.colAttrs.join(\"-\"));\n dataTable.addColumn('number', pivotData.rowAttrs.join(\"-\"));\n dataTable.addColumn({\n type: \"string\",\n role: \"tooltip\"\n });\n dataTable.addRows(dataArray);\n hAxisTitle = pivotData.colAttrs.join(\"-\");\n vAxisTitle = pivotData.rowAttrs.join(\"-\");\n title = \"\";\n } else {\n dataArray = [headers];\n for (i = 0, len = colKeys.length; i < len; i++) {\n colKey = colKeys[i];\n row = [colKey.join(\"-\")];\n numCharsInHAxis += row[0].length;\n for (j = 0, len1 = rowKeys.length; j < len1; j++) {\n rowKey = rowKeys[j];\n agg = pivotData.getAggregator(rowKey, colKey);\n if (agg.value() != null) {\n val = agg.value();\n if ($.isNumeric(val)) {\n if (val < 1) {\n row.push(parseFloat(val.toPrecision(3)));\n } else {\n row.push(parseFloat(val.toFixed(3)));\n }\n } else {\n row.push(val);\n }\n } else {\n row.push(null);\n }\n }\n dataArray.push(row);\n }\n dataTable = google.visualization.arrayToDataTable(dataArray);\n title = vAxisTitle = fullAggName;\n hAxisTitle = pivotData.colAttrs.join(\"-\");\n if (hAxisTitle !== \"\") {\n title += \" \" + opts.localeStrings.vs + \" \" + hAxisTitle;\n }\n groupByTitle = pivotData.rowAttrs.join(\"-\");\n if (groupByTitle !== \"\") {\n title += \" \" + opts.localeStrings.by + \" \" + groupByTitle;\n }\n }\n options = {\n title: title,\n hAxis: {\n title: hAxisTitle,\n slantedText: numCharsInHAxis > 50\n },\n vAxis: {\n title: vAxisTitle\n },\n tooltip: {\n textStyle: {\n fontName: 'Arial',\n fontSize: 12\n }\n }\n };\n if (chartType === \"ColumnChart\") {\n options.vAxis.minValue = 0;\n }\n if (chartType === \"ScatterChart\") {\n options.legend = {\n position: \"none\"\n };\n options.chartArea = {\n 'width': '80%',\n 'height': '80%'\n };\n } else if (dataArray[0].length === 2 && dataArray[0][1] === \"\") {\n options.legend = {\n position: \"none\"\n };\n }\n $.extend(options, opts.gchart, extraOptions);\n result = $(\"<div>\").css({\n width: \"100%\",\n height: \"100%\"\n });\n wrapper = new google.visualization.ChartWrapper({\n dataTable: dataTable,\n chartType: chartType,\n options: options\n });\n wrapper.draw(result[0]);\n result.bind(\"dblclick\", function() {\n var editor;\n editor = new google.visualization.ChartEditor();\n google.visualization.events.addListener(editor, 'ok', function() {\n return editor.getChartWrapper().draw(result[0]);\n });\n return editor.openDialog(wrapper);\n });\n return result;\n };\n };\n return $.pivotUtilities.gchart_renderers = {\n \"Line Chart\": makeGoogleChart(\"LineChart\"),\n \"Bar Chart\": makeGoogleChart(\"ColumnChart\"),\n \"Stacked Bar Chart\": makeGoogleChart(\"ColumnChart\", {\n isStacked: true\n }),\n \"Area Chart\": makeGoogleChart(\"AreaChart\", {\n isStacked: true\n }),\n \"Scatter Chart\": makeGoogleChart(\"ScatterChart\")\n };\n });\n\n}).call(this);\n\n//# sourceMappingURL=gchart_renderers.js.map\n"],"sourceRoot":"/source/"}
@@ -0,0 +1,97 @@
1
+ .pvtUi { color: #333; }
2
+
3
+
4
+ table.pvtTable {
5
+ font-size: 8pt;
6
+ text-align: left;
7
+ border-collapse: collapse;
8
+ }
9
+ table.pvtTable tr th, table.pvtTable tr th {
10
+ background-color: #e6EEEE;
11
+ border: 1px solid #CDCDCD;
12
+ font-size: 8pt;
13
+ padding: 5px;
14
+ }
15
+
16
+ table.pvtTable .pvtColLabel {text-align: center;}
17
+ table.pvtTable .pvtTotalLabel {text-align: right;}
18
+
19
+ table.pvtTable tr td {
20
+ color: #3D3D3D;
21
+ padding: 5px;
22
+ background-color: #FFF;
23
+ border: 1px solid #CDCDCD;
24
+ vertical-align: top;
25
+ text-align: right;
26
+ }
27
+
28
+ .pvtTotal, .pvtGrandTotal { font-weight: bold; }
29
+
30
+ .pvtVals { text-align: center;}
31
+ .pvtAggregator { margin-bottom: 5px ;}
32
+
33
+ .pvtAxisContainer, .pvtVals {
34
+ border: 1px solid gray;
35
+ background: #EEE;
36
+ padding: 5px;
37
+ min-width: 20px;
38
+ min-height: 20px;
39
+ }
40
+ .pvtAxisContainer li {
41
+ padding: 8px 6px;
42
+ list-style-type: none;
43
+ cursor:move;
44
+ }
45
+ .pvtAxisContainer li.pvtPlaceholder {
46
+ -webkit-border-radius: 5px;
47
+ padding: 3px 15px;
48
+ -moz-border-radius: 5px;
49
+ border-radius: 5px;
50
+ border: 1px dashed #aaa;
51
+ }
52
+
53
+ .pvtAxisContainer li span.pvtAttr {
54
+ -webkit-text-size-adjust: 100%;
55
+ background: #F3F3F3;
56
+ border: 1px solid #DEDEDE;
57
+ padding: 2px 5px;
58
+ white-space:nowrap;
59
+ -webkit-border-radius: 5px;
60
+ -moz-border-radius: 5px;
61
+ border-radius: 5px;
62
+ }
63
+
64
+ .pvtTriangle {
65
+ cursor:pointer;
66
+ color: grey;
67
+ }
68
+
69
+ .pvtHorizList li { display: inline; }
70
+ .pvtVertList { vertical-align: top; }
71
+
72
+ .pvtFilteredAttribute { font-style: italic }
73
+
74
+ .pvtFilterBox{
75
+ z-index: 100;
76
+ width: 280px;
77
+ border: 1px solid gray;
78
+ background-color: #fff;
79
+ position: absolute;
80
+ padding: 20px;
81
+ text-align: center;
82
+ }
83
+
84
+ .pvtFilterBox h4{ margin:0; }
85
+ .pvtFilterBox p { margin: 1em auto; }
86
+ .pvtFilterBox label { font-weight: normal; }
87
+ .pvtFilterBox input[type='checkbox'] { margin-right: 5px; }
88
+
89
+ .pvtCheckContainer{
90
+ text-align: left;
91
+ overflow: scroll;
92
+ width: 100%;
93
+ max-height: 200px;
94
+ }
95
+ .pvtCheckContainer p{ margin: 5px; }
96
+
97
+ .pvtRendererArea { padding: 5px;}
@@ -0,0 +1,78 @@
1
+ (function() {
2
+ var callWithJQuery;
3
+
4
+ callWithJQuery = function(pivotModule) {
5
+ if (typeof exports === "object" && typeof module === "object") {
6
+ return pivotModule(require("jquery"));
7
+ } else if (typeof define === "function" && define.amd) {
8
+ return define(["jquery"], pivotModule);
9
+ } else {
10
+ return pivotModule(jQuery);
11
+ }
12
+ };
13
+
14
+ callWithJQuery(function($) {
15
+ var frFmt, frFmtInt, frFmtPct, nf, tpl;
16
+ nf = $.pivotUtilities.numberFormat;
17
+ tpl = $.pivotUtilities.aggregatorTemplates;
18
+ frFmt = nf({
19
+ thousandsSep: " ",
20
+ decimalSep: ","
21
+ });
22
+ frFmtInt = nf({
23
+ digitsAfterDecimal: 0,
24
+ thousandsSep: " ",
25
+ decimalSep: ","
26
+ });
27
+ frFmtPct = nf({
28
+ digitsAfterDecimal: 1,
29
+ scaler: 100,
30
+ suffix: "%",
31
+ thousandsSep: " ",
32
+ decimalSep: ","
33
+ });
34
+ return $.pivotUtilities.locales.es = {
35
+ localeStrings: {
36
+ renderError: "Ocurri&oacute; un error durante la interpretaci&oacute;n de la tabla din&acute;mica.",
37
+ computeError: "Ocurri&oacute; un error durante el c&acute;lculo de la tabla din&acute;mica.",
38
+ uiRenderError: "Ocurri&oacute; un error durante el dibujado de la tabla din&acute;mica.",
39
+ selectAll: "Seleccionar todo",
40
+ selectNone: "Deseleccionar todo",
41
+ tooMany: "(demasiados valores)",
42
+ filterResults: "Filtrar resultados",
43
+ totals: "Totales",
44
+ vs: "vs",
45
+ by: "por"
46
+ },
47
+ aggregators: {
48
+ "Cuenta": tpl.count(frFmtInt),
49
+ "Cuenta de valores &uacute;nicos": tpl.countUnique(frFmtInt),
50
+ "Lista de valores &uacute;nicos": tpl.listUnique(", "),
51
+ "Suma": tpl.sum(frFmt),
52
+ "Suma de enteros": tpl.sum(frFmtInt),
53
+ "Promedio": tpl.average(frFmt),
54
+ "Mínimo": tpl.min(frFmt),
55
+ "Máximo": tpl.max(frFmt),
56
+ "Suma de sumas": tpl.sumOverSum(frFmt),
57
+ "Cota 80% superior": tpl.sumOverSumBound80(true, frFmt),
58
+ "Cota 80% inferior": tpl.sumOverSumBound80(false, frFmt),
59
+ "Proporci&oacute;n del total (suma)": tpl.fractionOf(tpl.sum(), "total", frFmtPct),
60
+ "Proporci&oacute;n de la fila (suma)": tpl.fractionOf(tpl.sum(), "row", frFmtPct),
61
+ "Proporci&oacute;n de la columna (suma)": tpl.fractionOf(tpl.sum(), "col", frFmtPct),
62
+ "Proporci&oacute;n del total (cuenta)": tpl.fractionOf(tpl.count(), "total", frFmtPct),
63
+ "Proporci&oacute;n de la fila (cuenta)": tpl.fractionOf(tpl.count(), "row", frFmtPct),
64
+ "Proporci&oacute;n de la columna (cuenta)": tpl.fractionOf(tpl.count(), "col", frFmtPct)
65
+ },
66
+ renderers: {
67
+ "Tabla": $.pivotUtilities.renderers["Table"],
68
+ "Tabla con barras": $.pivotUtilities.renderers["Table Barchart"],
69
+ "Heatmap": $.pivotUtilities.renderers["Heatmap"],
70
+ "Heatmap por filas": $.pivotUtilities.renderers["Row Heatmap"],
71
+ "Heatmap por columnas": $.pivotUtilities.renderers["Col Heatmap"]
72
+ }
73
+ };
74
+ });
75
+
76
+ }).call(this);
77
+
78
+ //# sourceMappingURL=pivot.es.js.map