pivottable
Advanced tools
Comparing version 1.4.2 to 1.4.3
{ | ||
"name": "pivottable", | ||
"description": "Javascript Pivot Table (aka Pivot Grid, Pivot Chart, Cross-Tab) implementation with drag'n'drop", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"main": [ | ||
@@ -6,0 +6,0 @@ "dist/pivot.js", |
@@ -29,6 +29,6 @@ (function() { | ||
width: function() { | ||
return $(window).width() / 1.4; | ||
return window.innerWidth / 1.4; | ||
}, | ||
height: function() { | ||
return $(window).height() / 1.4; | ||
return window.innerHeight / 1.4; | ||
} | ||
@@ -90,3 +90,3 @@ } | ||
if ($.isNumeric(val)) { | ||
if (val < 0) { | ||
if (val < 1) { | ||
row.push(parseFloat(val.toPrecision(3))); | ||
@@ -93,0 +93,0 @@ } else { |
@@ -1,2 +0,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(r,a){var n,o,i,l,u,s,c,p,h,d,g,f,y,v,j,x,m,w,b,A,k,C,F,N,q,S,B,K;if(c={localeStrings:{vs:"vs",by:"by"},c3:{width:function(){return t(window).width()/1.4},height:function(){return t(window).height()/1.4}}},a=t.extend(c,a),null==e.type&&(e.type="line"),F=r.getRowKeys(),0===F.length&&F.push([]),i=r.getColKeys(),0===i.length&&i.push([]),g=function(){var t,e,r;for(r=[],t=0,e=i.length;e>t;t++)h=i[t],r.push(h.join("-"));return r}(),p=r.aggregatorName,r.valAttrs.length&&(p+="("+r.valAttrs.join(", ")+")"),"scatter"===e.type){u=[],d=r.colAttrs.join("-"),q=r.rowAttrs.join("-"),m=r.tree;for(K in m){N=m[K];for(B in N)n=N[B],s={},s[d]=parseFloat(B),s[q]=parseFloat(K),s.tooltip=n.format(n.value()),u.push(s)}}else{for(l=[],f=0,v=F.length;v>f;f++){for(C=F[f],k=C.join("-"),A=[""===k?r.aggregatorName:k],y=0,j=i.length;j>y;y++)o=i[y],n=r.getAggregator(C,o),null!=n.value()?(S=n.value(),A.push(t.isNumeric(S)?0>S?parseFloat(S.toPrecision(3)):parseFloat(S.toFixed(3)):S)):A.push(null);l.push(A)}q=r.aggregatorName+(r.valAttrs.length?"("+r.valAttrs.join(", ")+")":""),d=r.colAttrs.join("-")}return x={size:{height:a.c3.height(),width:a.c3.width()},axis:{y:{label:q},x:{label:d}},data:{type:e.type},tooltip:{grouped:!1}},"scatter"===e.type?(x.data.x=d,x.axis.x.tick={fit:!1},x.data.json=u,x.data.keys={value:[d,q]},x.legend={show:!1},x.tooltip.format={title:function(){return p},name:function(){return""},value:function(t,e,r,a){return u[a].tooltip}}):(x.axis.x.type="category",x.axis.x.categories=g,x.data.columns=l),null!=e.stacked&&(x.data.groups=[function(){var t,e,r;for(r=[],t=0,e=F.length;e>t;t++)B=F[t],r.push(B.join("-"));return r}()]),w=t("<div>",{style:"display:none;"}).appendTo(t("body")),b=t("<div>").appendTo(w),x.bindto=b[0],c3.generate(x),b.detach(),w.remove(),b}},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(r,n){var a,o,i,l,u,s,c,p,h,d,g,f,y,v,j,x,m,b,w,A,k,C,F,N,q,S,B,K;if(c={localeStrings:{vs:"vs",by:"by"},c3:{width:function(){return window.innerWidth/1.4},height:function(){return window.innerHeight/1.4}}},n=t.extend(c,n),null==e.type&&(e.type="line"),F=r.getRowKeys(),0===F.length&&F.push([]),i=r.getColKeys(),0===i.length&&i.push([]),g=function(){var t,e,r;for(r=[],t=0,e=i.length;e>t;t++)h=i[t],r.push(h.join("-"));return r}(),p=r.aggregatorName,r.valAttrs.length&&(p+="("+r.valAttrs.join(", ")+")"),"scatter"===e.type){u=[],d=r.colAttrs.join("-"),q=r.rowAttrs.join("-"),m=r.tree;for(K in m){N=m[K];for(B in N)a=N[B],s={},s[d]=parseFloat(B),s[q]=parseFloat(K),s.tooltip=a.format(a.value()),u.push(s)}}else{for(l=[],f=0,v=F.length;v>f;f++){for(C=F[f],k=C.join("-"),A=[""===k?r.aggregatorName:k],y=0,j=i.length;j>y;y++)o=i[y],a=r.getAggregator(C,o),null!=a.value()?(S=a.value(),A.push(t.isNumeric(S)?1>S?parseFloat(S.toPrecision(3)):parseFloat(S.toFixed(3)):S)):A.push(null);l.push(A)}q=r.aggregatorName+(r.valAttrs.length?"("+r.valAttrs.join(", ")+")":""),d=r.colAttrs.join("-")}return x={size:{height:n.c3.height(),width:n.c3.width()},axis:{y:{label:q},x:{label:d}},data:{type:e.type},tooltip:{grouped:!1}},"scatter"===e.type?(x.data.x=d,x.axis.x.tick={fit:!1},x.data.json=u,x.data.keys={value:[d,q]},x.legend={show:!1},x.tooltip.format={title:function(){return p},name:function(){return""},value:function(t,e,r,n){return u[n].tooltip}}):(x.axis.x.type="category",x.axis.x.categories=g,x.data.columns=l),null!=e.stacked&&(x.data.groups=[function(){var t,e,r;for(r=[],t=0,e=F.length;e>t;t++)B=F[t],r.push(B.join("-"));return r}()]),b=t("<div>",{style:"display:none;"}).appendTo(t("body")),w=t("<div>").appendTo(b),x.bindto=w[0],c3.generate(x),w.detach(),b.remove(),w}},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 |
@@ -26,6 +26,6 @@ (function() { | ||
width: function() { | ||
return $(window).width() / 1.4; | ||
return window.innerWidth / 1.4; | ||
}, | ||
height: function() { | ||
return $(window).height() / 1.4; | ||
return window.innerHeight / 1.4; | ||
} | ||
@@ -91,3 +91,3 @@ } | ||
if ($.isNumeric(val)) { | ||
if (val < 0) { | ||
if (val < 1) { | ||
row.push(parseFloat(val.toPrecision(3))); | ||
@@ -94,0 +94,0 @@ } else { |
@@ -1,2 +0,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,r){return function(n,o){var i,a,l,h,s,u,g,d,c,f,p,v,C,w,A,m,y,j,b,S,x,z,T,k,F,q,D,L,N,B,K;if(u={localeStrings:{vs:"vs",by:"by"},gchart:{width:function(){return t(window).width()/1.4},height:function(){return t(window).height()/1.4}}},o=t.extend(u,o),T=n.getRowKeys(),0===T.length&&T.push([]),l=n.getColKeys(),0===l.length&&l.push([]),g=n.aggregatorName,n.valAttrs.length&&(g+="("+n.valAttrs.join(", ")+")"),p=function(){var t,e,r;for(r=[],t=0,e=T.length;e>t;t++)c=T[t],r.push(c.join("-"));return r}(),p.unshift(""),y=0,"ScatterChart"===e){h=[],b=n.tree;for(K in b){F=b[K];for(B in F)i=F[B],h.push([parseFloat(B),parseFloat(K),g+": \n"+i.format(i.value())])}s=new google.visualization.DataTable,s.addColumn("number",n.colAttrs.join("-")),s.addColumn("number",n.rowAttrs.join("-")),s.addColumn({type:"string",role:"tooltip"}),s.addRows(h),f=n.colAttrs.join("-"),D=n.rowAttrs.join("-"),k=""}else{for(h=[p],v=0,A=l.length;A>v;v++){for(a=l[v],x=[a.join("-")],y+=x[0].length,C=0,m=T.length;m>C;C++)z=T[C],i=n.getAggregator(z,a),null!=i.value()?(L=i.value(),x.push(t.isNumeric(L)?0>L?parseFloat(L.toPrecision(3)):parseFloat(L.toFixed(3)):L)):x.push(null);h.push(x)}s=google.visualization.arrayToDataTable(h),k=D=g,f=n.colAttrs.join("-"),""!==f&&(k+=" "+o.localeStrings.vs+" "+f),d=n.rowAttrs.join("-"),""!==d&&(k+=" "+o.localeStrings.by+" "+d)}j={width:o.gchart.width(),height:o.gchart.height(),title:k,hAxis:{title:f,slantedText:y>50},vAxis:{title:D},tooltip:{textStyle:{fontName:"Arial",fontSize:12}}},"ColumnChart"===e&&(j.vAxis.minValue=0),"ScatterChart"===e?(j.legend={position:"none"},j.chartArea={width:"80%",height:"80%"}):2===h[0].length&&""===h[0][1]&&(j.legend={position:"none"});for(w in r)q=r[w],j[w]=q;return S=t("<div>").css({width:"100%",height:"100%"}),N=new google.visualization.ChartWrapper({dataTable:s,chartType:e,options:j}),N.draw(S[0]),S.bind("dblclick",function(){var t;return t=new google.visualization.ChartEditor,google.visualization.events.addListener(t,"ok",function(){return t.getChartWrapper().draw(S[0])}),t.openDialog(N)}),S}},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); | ||
(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,i){var o,a,l,h,s,u,g,d,c,f,p,v,C,w,A,m,y,j,b,S,x,z,T,k,F,q,D,L,N,W,B;if(u={localeStrings:{vs:"vs",by:"by"},gchart:{width:function(){return window.innerWidth/1.4},height:function(){return window.innerHeight/1.4}}},i=t.extend(u,i),T=n.getRowKeys(),0===T.length&&T.push([]),l=n.getColKeys(),0===l.length&&l.push([]),g=n.aggregatorName,n.valAttrs.length&&(g+="("+n.valAttrs.join(", ")+")"),p=function(){var t,e,r;for(r=[],t=0,e=T.length;e>t;t++)c=T[t],r.push(c.join("-"));return r}(),p.unshift(""),y=0,"ScatterChart"===e){h=[],b=n.tree;for(B in b){F=b[B];for(W in F)o=F[W],h.push([parseFloat(W),parseFloat(B),g+": \n"+o.format(o.value())])}s=new google.visualization.DataTable,s.addColumn("number",n.colAttrs.join("-")),s.addColumn("number",n.rowAttrs.join("-")),s.addColumn({type:"string",role:"tooltip"}),s.addRows(h),f=n.colAttrs.join("-"),D=n.rowAttrs.join("-"),k=""}else{for(h=[p],v=0,A=l.length;A>v;v++){for(a=l[v],x=[a.join("-")],y+=x[0].length,C=0,m=T.length;m>C;C++)z=T[C],o=n.getAggregator(z,a),null!=o.value()?(L=o.value(),x.push(t.isNumeric(L)?1>L?parseFloat(L.toPrecision(3)):parseFloat(L.toFixed(3)):L)):x.push(null);h.push(x)}s=google.visualization.arrayToDataTable(h),k=D=g,f=n.colAttrs.join("-"),""!==f&&(k+=" "+i.localeStrings.vs+" "+f),d=n.rowAttrs.join("-"),""!==d&&(k+=" "+i.localeStrings.by+" "+d)}j={width:i.gchart.width(),height:i.gchart.height(),title:k,hAxis:{title:f,slantedText:y>50},vAxis:{title:D},tooltip:{textStyle:{fontName:"Arial",fontSize:12}}},"ColumnChart"===e&&(j.vAxis.minValue=0),"ScatterChart"===e?(j.legend={position:"none"},j.chartArea={width:"80%",height:"80%"}):2===h[0].length&&""===h[0][1]&&(j.legend={position:"none"});for(w in r)q=r[w],j[w]=q;return S=t("<div>").css({width:"100%",height:"100%"}),N=new google.visualization.ChartWrapper({dataTable:s,chartType:e,options:j}),N.draw(S[0]),S.bind("dblclick",function(){var t;return t=new google.visualization.ChartEditor,google.visualization.events.addListener(t,"ok",function(){return t.getChartWrapper().draw(S[0])}),t.openDialog(N)}),S}},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); | ||
//# sourceMappingURL=gchart_renderers.min.js.map |
{ | ||
"name": "pivottable", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "Javascript Pivot Table (aka Pivot Grid, Pivot Chart, Cross-Tab) implementation with drag'n'drop", | ||
@@ -5,0 +5,0 @@ "main": "dist/pivot.js", |
@@ -14,3 +14,3 @@ { | ||
], | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"author": { | ||
@@ -17,0 +17,0 @@ "name": "Nicolas Kruchten", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
630843