From 21dee2670e2bcf1ecce63d78decb9644d6ddd200 Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Thu, 27 Aug 2015 18:27:34 +0000 Subject: [PATCH] enhance pivot table element to be well formed for potential use with DataTables plugin --- dist/c3_renderers.min.js | 2 +- dist/c3_renderers.min.js.map | 2 +- dist/export_renderers.min.js | 2 +- dist/export_renderers.min.js.map | 2 +- dist/gchart_renderers.min.js | 2 +- dist/gchart_renderers.min.js.map | 2 +- dist/pivot.js | 45 ++++++++++++++++++++++---------- dist/pivot.js.map | 2 +- dist/pivot.min.js | 2 +- dist/pivot.min.js.map | 2 +- pivot.coffee | 43 ++++++++++++++++++++---------- 11 files changed, 69 insertions(+), 37 deletions(-) diff --git a/dist/c3_renderers.min.js b/dist/c3_renderers.min.js index ccd9bc25..7bc71766 100644 --- a/dist/c3_renderers.min.js +++ b/dist/c3_renderers.min.js @@ -1,2 +1,2 @@ -(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){return null==e&&(e={}),function(a,r){var n,o,i,l,s,c,u,p,d,g,h,f,y,v,b,j,x,m,w,A,k,C,F,S,z,N,q,B,K,T,H,L,P,Q,R,U,W,_;if(g={localeStrings:{vs:"vs",by:"by"},c3:{}},r=t.extend(!0,g,r),null==(o=r.c3).size&&(o.size={}),null==(i=r.c3.size).width&&(i.width=window.innerWidth/1.4),null==(l=r.c3.size).height&&(l.height=window.innerHeight/1.4-50),null==e.type&&(e.type="line"),H=a.getRowKeys(),0===H.length&&H.push([]),c=a.getColKeys(),0===c.length&&c.push([]),b=function(){var t,e,a;for(a=[],t=0,e=c.length;e>t;t++)y=c[t],a.push(y.join("-"));return a}(),q=0,h=a.aggregatorName,a.valAttrs.length&&(h+="("+a.valAttrs.join(", ")+")"),"scatter"===e.type){p=[],v=a.colAttrs.join("-"),R=a.rowAttrs.join("-"),S=a.tree;for(_ in S){Q=S[_];for(W in Q)n=Q[W],d={},d[v]=parseFloat(W),d[R]=parseFloat(_),d.tooltip=n.format(n.value()),p.push(d)}}else{for(C=0,j=0,w=b.length;w>j;j++)W=b[j],C+=W.length;for(C>50&&(q=45),u=[],x=0,A=H.length;A>x;x++){for(T=H[x],K=T.join("-"),B=[""===K?a.aggregatorName:K],m=0,k=c.length;k>m;m++)s=c[m],n=a.getAggregator(T,s),null!=n.value()?(U=n.value(),B.push(t.isNumeric(U)?1>U?parseFloat(U.toPrecision(3)):parseFloat(U.toFixed(3)):U)):B.push(null);u.push(B)}R=a.aggregatorName+(a.valAttrs.length?"("+a.valAttrs.join(", ")+")":""),v=a.colAttrs.join("-")}return P=h,""!==v&&(P+=" "+r.localeStrings.vs+" "+v),f=a.rowAttrs.join("-"),""!==f&&(P+=" "+r.localeStrings.by+" "+f),L=t("

",{style:"text-align: center; font-weight: bold"}),L.text(P),F={axis:{y:{label:R},x:{label:v,tick:{rotate:q,multiline:!1}}},data:{type:e.type},tooltip:{grouped:!1},color:{pattern:["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac"]}},t.extend(F,r.c3),"scatter"===e.type?(F.data.x=v,F.axis.x.tick={fit:!1},F.data.json=p,F.data.keys={value:[v,R]},F.legend={show:!1},F.tooltip.format={title:function(){return h},name:function(){return""},value:function(t,e,a,r){return p[r].tooltip}}):(F.axis.x.type="category",F.axis.x.categories=b,F.data.columns=u),null!=e.stacked&&(F.data.groups=[function(){var t,e,a;for(a=[],t=0,e=H.length;e>t;t++)W=H[t],a.push(W.join("-"));return a}()]),z=t("

",{style:"display:none;"}).appendTo(t("body")),N=t("
").appendTo(z),F.bindto=N[0],c3.generate(F),N.detach(),z.remove(),t("
").append(L,N)}},t.pivotUtilities.c3_renderers={"Line Chart":e(),"Bar Chart":e({type:"bar"}),"Stacked Bar Chart":e({type:"bar",stacked:!0}),"Area Chart":e({type:"area",stacked:!0}),"Scatter Chart":e({type:"scatter"})}})}).call(this); +(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){return null==e&&(e={}),function(a,r){var n,o,i,l,s,u,c,p,d,g,h,f,y,v,b,j,x,m,w,A,k,C,F,S,z,N,q,B,K,T,H,L,P,Q,R,U,W,_;if(g={localeStrings:{vs:"vs",by:"by"},c3:{}},r=t.extend(!0,g,r),null==(o=r.c3).size&&(o.size={}),null==(i=r.c3.size).width&&(i.width=window.innerWidth/1.4),null==(l=r.c3.size).height&&(l.height=window.innerHeight/1.4-50),null==e.type&&(e.type="line"),H=a.getRowKeys(),0===H.length&&H.push([]),u=a.getColKeys(),0===u.length&&u.push([]),b=function(){var t,e,a;for(a=[],t=0,e=u.length;e>t;t++)y=u[t],a.push(y.join("-"));return a}(),q=0,h=a.aggregatorName,a.valAttrs.length&&(h+="("+a.valAttrs.join(", ")+")"),"scatter"===e.type){p=[],v=a.colAttrs.join("-"),R=a.rowAttrs.join("-"),S=a.tree;for(_ in S){Q=S[_];for(W in Q)n=Q[W],d={},d[v]=parseFloat(W),d[R]=parseFloat(_),d.tooltip=n.format(n.value()),p.push(d)}}else{for(C=0,j=0,w=b.length;w>j;j++)W=b[j],C+=W.length;for(C>50&&(q=45),c=[],x=0,A=H.length;A>x;x++){for(T=H[x],K=T.join("-"),B=[""===K?a.aggregatorName:K],m=0,k=u.length;k>m;m++)s=u[m],n=a.getAggregator(T,s),null!=n.value()?(U=n.value(),t.isNumeric(U)?1>U?B.push(parseFloat(U.toPrecision(3))):B.push(parseFloat(U.toFixed(3))):B.push(U)):B.push(null);c.push(B)}R=a.aggregatorName+(a.valAttrs.length?"("+a.valAttrs.join(", ")+")":""),v=a.colAttrs.join("-")}return P=h,""!==v&&(P+=" "+r.localeStrings.vs+" "+v),f=a.rowAttrs.join("-"),""!==f&&(P+=" "+r.localeStrings.by+" "+f),L=t("

",{style:"text-align: center; font-weight: bold"}),L.text(P),F={axis:{y:{label:R},x:{label:v,tick:{rotate:q,multiline:!1}}},data:{type:e.type},tooltip:{grouped:!1},color:{pattern:["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac"]}},t.extend(F,r.c3),"scatter"===e.type?(F.data.x=v,F.axis.x.tick={fit:!1},F.data.json=p,F.data.keys={value:[v,R]},F.legend={show:!1},F.tooltip.format={title:function(){return h},name:function(){return""},value:function(t,e,a,r){return p[r].tooltip}}):(F.axis.x.type="category",F.axis.x.categories=b,F.data.columns=c),null!=e.stacked&&(F.data.groups=[function(){var t,e,a;for(a=[],t=0,e=H.length;e>t;t++)W=H[t],a.push(W.join("-"));return a}()]),z=t("

",{style:"display:none;"}).appendTo(t("body")),N=t("
").appendTo(z),F.bindto=N[0],c3.generate(F),N.detach(),z.remove(),t("
").append(L,N)}},t.pivotUtilities.c3_renderers={"Line Chart":e(),"Bar Chart":e({type:"bar"}),"Stacked Bar Chart":e({type:"bar",stacked:!0}),"Area Chart":e({type:"area",stacked:!0}),"Scatter Chart":e({type:"scatter"})}})}).call(this); //# sourceMappingURL=c3_renderers.min.js.map \ No newline at end of file diff --git a/dist/c3_renderers.min.js.map b/dist/c3_renderers.min.js.map index 8f77c264..072718d8 100644 --- a/dist/c3_renderers.min.js.map +++ b/dist/c3_renderers.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["/source/c3_renderers.coffee","c3_renderers.min.js"],"names":["callWithJQuery","pivotModule","exports","module","require","define","amd","jQuery","$","makeC3Chart","chartOpts","pivotData","opts","agg","base","base1","base2","colKey","colKeys","columns","dataArray","datum","defaults","fullAggName","groupByTitle","h","hAxisTitle","headers","i","j","k","len","len1","len2","numCharsInHAxis","params","ref","renderArea","result","rotationAngle","row","rowHeader","rowKey","rowKeys","title","titleText","tree2","vAxisTitle","val","x","y","localeStrings","vs","by","c3","extend","size","width","window","innerWidth","height","innerHeight","type","getRowKeys","length","push","getColKeys","results","join","aggregatorName","valAttrs","colAttrs","rowAttrs","tree","parseFloat","format","value","getAggregator","isNumeric","toPrecision","toFixed","style","text","axis","label","tick","rotate","multiline","data","tooltip","grouped","color","pattern","fit","json","keys","legend","show","name","a","b","c","d","categories","stacked","groups","l","len3","appendTo","bindto","generate","detach","remove","append","pivotUtilities","c3_renderers","Line Chart","Bar Chart","Stacked Bar Chart","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,ECiMA,ODjMAA,GAAc,SAACC,GCQb,MAHiB,OAAbA,IDLSA,MAAmB,SAACC,EAAWC,GAC1C,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,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,CAwBA,IAxBA5B,GACI6B,eACIC,GAAI,KACJC,GAAI,MACRC,OAEJ1C,EAAOJ,EAAE+C,QAAO,EAAMjC,EAAUV,GCWH,OAAxBE,EAAOF,EAAK0C,IAAIE,OACnB1C,EDXM0C,SCa4B,OAA/BzC,EAAQH,EAAK0C,GAAGE,MAAMC,QACzB1C,EDbW0C,MAASC,OAAOC,WAAa,KCeL,OAAhC3C,EAAQJ,EAAK0C,GAAGE,MAAMI,SACzB5C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1E,EACnBe,EAAOqD,KAAKO,MAAOnB,OAAQlD,EAAWqB,IACtCZ,EAAO6D,QAASC,MAAM,GACtB9D,EAAOsD,QAAQd,QACX/B,MAAO,WCoDT,MDpDYrB,IACV2E,KAAM,WCsDR,MDtDW,IACTtB,MAAO,SAACuB,EAAEC,EAAEC,EAAEC,GCwDhB,MDxDsBlF,GAAUkF,GAAGb,YAErCtD,EAAOgD,KAAKlC,EAAEa,KAAM,WACpB3B,EAAOgD,KAAKlC,EAAEsD,WAAa5E,EAC3BQ,EAAOqD,KAAKrE,QAAUA,GAGvB,MAAAT,EAAA8F,UACCrE,EAAOqD,KAAKiB,QC0DZ,WACE,GAAIC,GAAGC,EAAMxC,CAEb,KD7DoBA,KAAAuC,EAAA,EAAAC,EAAAhE,EAAAqB,OAAA2C,EAAAD,EAAAA,IC8DlBzD,EAAIN,EAAQ+D,GACZvC,EAAQF,KD/DUhB,EAAEmB,KAAK,KCiE3B,OAAOD,QDhEb9B,EAAa7B,EAAE,SAASyE,MAAO,kBAAiB2B,SAASpG,EAAE,SAC3D8B,EAAS9B,EAAE,SAASoG,SAASvE,GAC7BF,EAAO0E,OAASvE,EAAO,GACvBgB,GAAGwD,SAAS3E,GACZG,EAAOyE,SACP1E,EAAW2E,SACJxG,EAAE,SAASyG,OAAOrE,EAAON,KAEpC9B,EAAE0G,eAAeC,cACbC,aAAc3G,IACd4G,YAAa5G,GAAYqD,KAAM,QAC/BwD,oBAAqB7G,GAAYqD,KAAM,MAAO0C,SAAS,IACvDe,aAAc9G,GAAYqD,KAAM,OAAQ0C,SAAS,IACjDgB,gBAAiB/G,GAAYqD,KAAM,iBCqFxC2D,KAAKC","file":"c3_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 makeC3Chart = (chartOpts = {}) -> (pivotData, opts) ->\n defaults =\n localeStrings:\n vs: \"vs\"\n by: \"by\"\n c3: {}\n\n opts = $.extend true, defaults, opts\n opts.c3.size ?= {}\n opts.c3.size.width ?= window.innerWidth / 1.4\n opts.c3.size.height ?= window.innerHeight / 1.4 - 50\n chartOpts.type ?= \"line\"\n\n rowKeys = pivotData.getRowKeys()\n rowKeys.push [] if rowKeys.length == 0\n colKeys = pivotData.getColKeys()\n colKeys.push [] if colKeys.length == 0\n\n headers = (h.join(\"-\") for h in colKeys)\n rotationAngle = 0\n\n fullAggName = pivotData.aggregatorName \n if pivotData.valAttrs.length\n fullAggName += \"(#{pivotData.valAttrs.join(\", \")})\"\n\n if chartOpts.type == \"scatter\"\n dataArray = []\n hAxisTitle = pivotData.colAttrs.join(\"-\")\n vAxisTitle = pivotData.rowAttrs.join(\"-\")\n for y, tree2 of pivotData.tree\n for x, agg of tree2\n datum = {}\n datum[hAxisTitle] = parseFloat(x)\n datum[vAxisTitle] = parseFloat(y)\n datum[\"tooltip\"] = agg.format(agg.value())\n dataArray.push datum\n else\n numCharsInHAxis = 0\n for x in headers\n numCharsInHAxis += x.length\n if numCharsInHAxis > 50\n rotationAngle = 45\n\n columns = []\n for rowKey in rowKeys\n rowHeader = rowKey.join(\"-\")\n row = [if rowHeader == \"\" then pivotData.aggregatorName else rowHeader]\n for colKey in colKeys\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\n else row.push null\n columns.push row\n\n vAxisTitle = pivotData.aggregatorName+ \n if pivotData.valAttrs.length then \"(#{pivotData.valAttrs.join(\", \")})\" else \"\"\n hAxisTitle = pivotData.colAttrs.join(\"-\")\n\n titleText = fullAggName\n titleText += \" #{opts.localeStrings.vs} #{hAxisTitle}\" if hAxisTitle != \"\"\n groupByTitle = pivotData.rowAttrs.join(\"-\")\n titleText += \" #{opts.localeStrings.by} #{groupByTitle}\" if groupByTitle != \"\"\n title = $(\"

\", {style: \"text-align: center; font-weight: bold\"})\n title.text(titleText)\n\n params = \n axis: \n y:\n label: vAxisTitle\n x:\n label: hAxisTitle\n tick:\n rotate: rotationAngle\n multiline: false\n data: \n type: chartOpts.type\n tooltip:\n grouped: false\n color: \n pattern: [ \"#3366cc\", \"#dc3912\", \"#ff9900\", \"#109618\",\n \"#990099\", \"#0099c6\", \"#dd4477\", \"#66aa00\",\n \"#b82e2e\", \"#316395\", \"#994499\", \"#22aa99\",\n \"#aaaa11\", \"#6633cc\", \"#e67300\", \"#8b0707\",\n \"#651067\", \"#329262\", \"#5574a6\", \"#3b3eac\" ]\n\n\n $.extend params, opts.c3\n\n if chartOpts.type == \"scatter\"\n params.data.x = hAxisTitle\n params.axis.x.tick = fit: false\n params.data.json = dataArray\n params.data.keys = value: [hAxisTitle,vAxisTitle]\n params.legend = show: false \n params.tooltip.format = \n title: -> fullAggName\n name: -> \"\"\n value: (a,b,c,d) -> dataArray[d].tooltip\n else\n params.axis.x.type= 'category'\n params.axis.x.categories = headers\n params.data.columns = columns\n\n\n if chartOpts.stacked?\n params.data.groups = [x.join(\"-\") for x in rowKeys]\n renderArea = $(\"

\", style: \"display:none;\").appendTo $(\"body\")\n result = $(\"
\").appendTo renderArea\n params.bindto = result[0]\n c3.generate params\n result.detach()\n renderArea.remove()\n return $(\"
\").append title, result\n\n $.pivotUtilities.c3_renderers = \n \"Line Chart\": makeC3Chart()\n \"Bar Chart\": makeC3Chart(type: \"bar\")\n \"Stacked Bar Chart\": makeC3Chart(type: \"bar\", stacked: true)\n \"Area Chart\": makeC3Chart(type: \"area\", stacked: true)\n \"Scatter Chart\": makeC3Chart(type: \"scatter\")\n","(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){return null==e&&(e={}),function(r,n){var a,o,i,l,s,u,c,p,g,d,h,f,y,v,j,x,b,m,w,A,k,C,F,S,z,N,q,B,K,T,H,L,P,Q,R,U,W,_;if(d={localeStrings:{vs:\"vs\",by:\"by\"},c3:{}},n=t.extend(!0,d,n),null==(o=n.c3).size&&(o.size={}),null==(i=n.c3.size).width&&(i.width=window.innerWidth/1.4),null==(l=n.c3.size).height&&(l.height=window.innerHeight/1.4-50),null==e.type&&(e.type=\"line\"),H=r.getRowKeys(),0===H.length&&H.push([]),u=r.getColKeys(),0===u.length&&u.push([]),j=function(){var t,e,r;for(r=[],t=0,e=u.length;e>t;t++)y=u[t],r.push(y.join(\"-\"));return r}(),q=0,h=r.aggregatorName,r.valAttrs.length&&(h+=\"(\"+r.valAttrs.join(\", \")+\")\"),\"scatter\"===e.type){p=[],v=r.colAttrs.join(\"-\"),R=r.rowAttrs.join(\"-\"),S=r.tree;for(_ in S){Q=S[_];for(W in Q)a=Q[W],g={},g[v]=parseFloat(W),g[R]=parseFloat(_),g.tooltip=a.format(a.value()),p.push(g)}}else{for(C=0,x=0,w=j.length;w>x;x++)W=j[x],C+=W.length;for(C>50&&(q=45),c=[],b=0,A=H.length;A>b;b++){for(T=H[b],K=T.join(\"-\"),B=[\"\"===K?r.aggregatorName:K],m=0,k=u.length;k>m;m++)s=u[m],a=r.getAggregator(T,s),null!=a.value()?(U=a.value(),B.push(t.isNumeric(U)?1>U?parseFloat(U.toPrecision(3)):parseFloat(U.toFixed(3)):U)):B.push(null);c.push(B)}R=r.aggregatorName+(r.valAttrs.length?\"(\"+r.valAttrs.join(\", \")+\")\":\"\"),v=r.colAttrs.join(\"-\")}return P=h,\"\"!==v&&(P+=\" \"+n.localeStrings.vs+\" \"+v),f=r.rowAttrs.join(\"-\"),\"\"!==f&&(P+=\" \"+n.localeStrings.by+\" \"+f),L=t(\"

\",{style:\"text-align: center; font-weight: bold\"}),L.text(P),F={axis:{y:{label:R},x:{label:v,tick:{rotate:q,multiline:!1}}},data:{type:e.type},tooltip:{grouped:!1}},t.extend(F,n.c3),\"scatter\"===e.type?(F.data.x=v,F.axis.x.tick={fit:!1},F.data.json=p,F.data.keys={value:[v,R]},F.legend={show:!1},F.tooltip.format={title:function(){return h},name:function(){return\"\"},value:function(t,e,r,n){return p[n].tooltip}}):(F.axis.x.type=\"category\",F.axis.x.categories=j,F.data.columns=c),null!=e.stacked&&(F.data.groups=[function(){var t,e,r;for(r=[],t=0,e=H.length;e>t;t++)W=H[t],r.push(W.join(\"-\"));return r}()]),z=t(\"

\",{style:\"display:none;\"}).appendTo(t(\"body\")),N=t(\"
\").appendTo(z),F.bindto=N[0],c3.generate(F),N.detach(),z.remove(),t(\"
\").append(L,N)}},t.pivotUtilities.c3_renderers={\"Line Chart\":e(),\"Bar Chart\":e({type:\"bar\"}),\"Stacked Bar Chart\":e({type:\"bar\",stacked:!0}),\"Area Chart\":e({type:\"area\",stacked:!0}),\"Scatter Chart\":e({type:\"scatter\"})}})}).call(this);\n//# sourceMappingURL=c3_renderers.min.js.map"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["/source/c3_renderers.coffee","c3_renderers.min.js"],"names":["callWithJQuery","pivotModule","exports","module","require","define","amd","jQuery","$","makeC3Chart","chartOpts","pivotData","opts","agg","base","base1","base2","colKey","colKeys","columns","dataArray","datum","defaults","fullAggName","groupByTitle","h","hAxisTitle","headers","i","j","k","len","len1","len2","numCharsInHAxis","params","ref","renderArea","result","rotationAngle","row","rowHeader","rowKey","rowKeys","title","titleText","tree2","vAxisTitle","val","x","y","localeStrings","vs","by","c3","extend","size","width","window","innerWidth","height","innerHeight","type","getRowKeys","length","push","getColKeys","results","join","aggregatorName","valAttrs","colAttrs","rowAttrs","tree","parseFloat","format","value","getAggregator","isNumeric","toPrecision","toFixed","style","text","axis","label","tick","rotate","multiline","data","tooltip","grouped","color","pattern","fit","json","keys","legend","show","name","a","b","c","d","categories","stacked","groups","l","len3","appendTo","bindto","generate","detach","remove","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ACpB3B,EAAOgD,KAAKlC,EAAEsD,WAAa5E,EAC3BQ,EAAOqD,KAAKrE,QAAUA,GAGvB,MAAAT,EAAA8F,UACCrE,EAAOqD,KAAKiB,QC0DZ,WACE,GAAIC,GAAGC,EAAMxC,CAEb,KD7DoBA,KAAAuC,EAAA,EAAAC,EAAAhE,EAAAqB,OAAA2C,EAAAD,EAAAA,IC8DlBzD,EAAIN,EAAQ+D,GACZvC,EAAQF,KD/DUhB,EAAEmB,KAAK,KCiE3B,OAAOD,QDhEb9B,EAAa7B,EAAE,SAASyE,MAAO,kBAAiB2B,SAASpG,EAAE,SAC3D8B,EAAS9B,EAAE,SAASoG,SAASvE,GAC7BF,EAAO0E,OAASvE,EAAO,GACvBgB,GAAGwD,SAAS3E,GACZG,EAAOyE,SACP1E,EAAW2E,SACJxG,EAAE,SAASyG,OAAOrE,EAAON,KAEpC9B,EAAE0G,eAAeC,cACbC,aAAc3G,IACd4G,YAAa5G,GAAYqD,KAAM,QAC/BwD,oBAAqB7G,GAAYqD,KAAM,MAAO0C,SAAS,IACvDe,aAAc9G,GAAYqD,KAAM,OAAQ0C,SAAS,IACjDgB,gBAAiB/G,GAAYqD,KAAM,iBCqFxC2D,KAAKC","file":"c3_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 makeC3Chart = (chartOpts = {}) -> (pivotData, opts) ->\n defaults =\n localeStrings:\n vs: \"vs\"\n by: \"by\"\n c3: {}\n\n opts = $.extend true, defaults, opts\n opts.c3.size ?= {}\n opts.c3.size.width ?= window.innerWidth / 1.4\n opts.c3.size.height ?= window.innerHeight / 1.4 - 50\n chartOpts.type ?= \"line\"\n\n rowKeys = pivotData.getRowKeys()\n rowKeys.push [] if rowKeys.length == 0\n colKeys = pivotData.getColKeys()\n colKeys.push [] if colKeys.length == 0\n\n headers = (h.join(\"-\") for h in colKeys)\n rotationAngle = 0\n\n fullAggName = pivotData.aggregatorName \n if pivotData.valAttrs.length\n fullAggName += \"(#{pivotData.valAttrs.join(\", \")})\"\n\n if chartOpts.type == \"scatter\"\n dataArray = []\n hAxisTitle = pivotData.colAttrs.join(\"-\")\n vAxisTitle = pivotData.rowAttrs.join(\"-\")\n for y, tree2 of pivotData.tree\n for x, agg of tree2\n datum = {}\n datum[hAxisTitle] = parseFloat(x)\n datum[vAxisTitle] = parseFloat(y)\n datum[\"tooltip\"] = agg.format(agg.value())\n dataArray.push datum\n else\n numCharsInHAxis = 0\n for x in headers\n numCharsInHAxis += x.length\n if numCharsInHAxis > 50\n rotationAngle = 45\n\n columns = []\n for rowKey in rowKeys\n rowHeader = rowKey.join(\"-\")\n row = [if rowHeader == \"\" then pivotData.aggregatorName else rowHeader]\n for colKey in colKeys\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\n else row.push null\n columns.push row\n\n vAxisTitle = pivotData.aggregatorName+ \n if pivotData.valAttrs.length then \"(#{pivotData.valAttrs.join(\", \")})\" else \"\"\n hAxisTitle = pivotData.colAttrs.join(\"-\")\n\n titleText = fullAggName\n titleText += \" #{opts.localeStrings.vs} #{hAxisTitle}\" if hAxisTitle != \"\"\n groupByTitle = pivotData.rowAttrs.join(\"-\")\n titleText += \" #{opts.localeStrings.by} #{groupByTitle}\" if groupByTitle != \"\"\n title = $(\"

\", {style: \"text-align: center; font-weight: bold\"})\n title.text(titleText)\n\n params = \n axis: \n y:\n label: vAxisTitle\n x:\n label: hAxisTitle\n tick:\n rotate: rotationAngle\n multiline: false\n data: \n type: chartOpts.type\n tooltip:\n grouped: false\n color: \n pattern: [ \"#3366cc\", \"#dc3912\", \"#ff9900\", \"#109618\",\n \"#990099\", \"#0099c6\", \"#dd4477\", \"#66aa00\",\n \"#b82e2e\", \"#316395\", \"#994499\", \"#22aa99\",\n \"#aaaa11\", \"#6633cc\", \"#e67300\", \"#8b0707\",\n \"#651067\", \"#329262\", \"#5574a6\", \"#3b3eac\" ]\n\n\n $.extend params, opts.c3\n\n if chartOpts.type == \"scatter\"\n params.data.x = hAxisTitle\n params.axis.x.tick = fit: false\n params.data.json = dataArray\n params.data.keys = value: [hAxisTitle,vAxisTitle]\n params.legend = show: false \n params.tooltip.format = \n title: -> fullAggName\n name: -> \"\"\n value: (a,b,c,d) -> dataArray[d].tooltip\n else\n params.axis.x.type= 'category'\n params.axis.x.categories = headers\n params.data.columns = columns\n\n\n if chartOpts.stacked?\n params.data.groups = [x.join(\"-\") for x in rowKeys]\n renderArea = $(\"

\", style: \"display:none;\").appendTo $(\"body\")\n result = $(\"
\").appendTo renderArea\n params.bindto = result[0]\n c3.generate params\n result.detach()\n renderArea.remove()\n return $(\"
\").append title, result\n\n $.pivotUtilities.c3_renderers = \n \"Line Chart\": makeC3Chart()\n \"Bar Chart\": makeC3Chart(type: \"bar\")\n \"Stacked Bar Chart\": makeC3Chart(type: \"bar\", stacked: true)\n \"Area Chart\": makeC3Chart(type: \"area\", stacked: true)\n \"Scatter Chart\": makeC3Chart(type: \"scatter\")\n","(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){return null==e&&(e={}),function(a,r){var n,o,i,l,s,u,c,p,d,g,h,f,y,v,b,j,x,m,w,A,k,C,F,S,z,N,q,B,K,T,H,L,P,Q,R,U,W,_;if(g={localeStrings:{vs:\"vs\",by:\"by\"},c3:{}},r=t.extend(!0,g,r),null==(o=r.c3).size&&(o.size={}),null==(i=r.c3.size).width&&(i.width=window.innerWidth/1.4),null==(l=r.c3.size).height&&(l.height=window.innerHeight/1.4-50),null==e.type&&(e.type=\"line\"),H=a.getRowKeys(),0===H.length&&H.push([]),u=a.getColKeys(),0===u.length&&u.push([]),b=function(){var t,e,a;for(a=[],t=0,e=u.length;e>t;t++)y=u[t],a.push(y.join(\"-\"));return a}(),q=0,h=a.aggregatorName,a.valAttrs.length&&(h+=\"(\"+a.valAttrs.join(\", \")+\")\"),\"scatter\"===e.type){p=[],v=a.colAttrs.join(\"-\"),R=a.rowAttrs.join(\"-\"),S=a.tree;for(_ in S){Q=S[_];for(W in Q)n=Q[W],d={},d[v]=parseFloat(W),d[R]=parseFloat(_),d.tooltip=n.format(n.value()),p.push(d)}}else{for(C=0,j=0,w=b.length;w>j;j++)W=b[j],C+=W.length;for(C>50&&(q=45),c=[],x=0,A=H.length;A>x;x++){for(T=H[x],K=T.join(\"-\"),B=[\"\"===K?a.aggregatorName:K],m=0,k=u.length;k>m;m++)s=u[m],n=a.getAggregator(T,s),null!=n.value()?(U=n.value(),t.isNumeric(U)?1>U?B.push(parseFloat(U.toPrecision(3))):B.push(parseFloat(U.toFixed(3))):B.push(U)):B.push(null);c.push(B)}R=a.aggregatorName+(a.valAttrs.length?\"(\"+a.valAttrs.join(\", \")+\")\":\"\"),v=a.colAttrs.join(\"-\")}return P=h,\"\"!==v&&(P+=\" \"+r.localeStrings.vs+\" \"+v),f=a.rowAttrs.join(\"-\"),\"\"!==f&&(P+=\" \"+r.localeStrings.by+\" \"+f),L=t(\"

\",{style:\"text-align: center; font-weight: bold\"}),L.text(P),F={axis:{y:{label:R},x:{label:v,tick:{rotate:q,multiline:!1}}},data:{type:e.type},tooltip:{grouped:!1},color:{pattern:[\"#3366cc\",\"#dc3912\",\"#ff9900\",\"#109618\",\"#990099\",\"#0099c6\",\"#dd4477\",\"#66aa00\",\"#b82e2e\",\"#316395\",\"#994499\",\"#22aa99\",\"#aaaa11\",\"#6633cc\",\"#e67300\",\"#8b0707\",\"#651067\",\"#329262\",\"#5574a6\",\"#3b3eac\"]}},t.extend(F,r.c3),\"scatter\"===e.type?(F.data.x=v,F.axis.x.tick={fit:!1},F.data.json=p,F.data.keys={value:[v,R]},F.legend={show:!1},F.tooltip.format={title:function(){return h},name:function(){return\"\"},value:function(t,e,a,r){return p[r].tooltip}}):(F.axis.x.type=\"category\",F.axis.x.categories=b,F.data.columns=c),null!=e.stacked&&(F.data.groups=[function(){var t,e,a;for(a=[],t=0,e=H.length;e>t;t++)W=H[t],a.push(W.join(\"-\"));return a}()]),z=t(\"

\",{style:\"display:none;\"}).appendTo(t(\"body\")),N=t(\"
\").appendTo(z),F.bindto=N[0],c3.generate(F),N.detach(),z.remove(),t(\"
\").append(L,N)}},t.pivotUtilities.c3_renderers={\"Line Chart\":e(),\"Bar Chart\":e({type:\"bar\"}),\"Stacked Bar Chart\":e({type:\"bar\",stacked:!0}),\"Area Chart\":e({type:\"area\",stacked:!0}),\"Scatter Chart\":e({type:\"scatter\"})}})}).call(this);\n//# sourceMappingURL=c3_renderers.min.js.map"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/export_renderers.min.js b/dist/export_renderers.min.js index 5a7921b8..e3aaee42 100644 --- a/dist/export_renderers.min.js +++ b/dist/export_renderers.min.js @@ -1,2 +1,2 @@ -(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,f,p,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,p=b.length;p>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=[],f=0,d=K.length;d>f;f++)v=K[f],q.push(v);for(y=0,w=u.length;w>y;y++)h=u[y],r=t.getAggregator(K,h),q.push(null!=r.value()?r.value():"");m.push(q)}for(C="",j=0,x=m.length;x>j;j++)v=m[j],C+=v.join(" ")+"\n";return e("