Permalink
Browse files

minified files

  • Loading branch information...
1 parent f9ab725 commit b0290afa10307ed79e6fc77a19688557e1978edc @karolk karolk committed Aug 20, 2012
Showing with 70 additions and 13 deletions.
  1. +15 −3 min/g.bar-min.js
  2. +7 −3 min/g.dot-min.js
  3. +11 −3 min/g.line-min.js
  4. +13 −1 min/g.pie-min.js
  5. +24 −3 min/g.raphael-min.js
View
@@ -1,7 +1,19 @@
/*!
- * g.Raphael 0.5 - Charting library, based on Raphaël
+ * g.Raphael 0.51 - Charting library, based on Raphaël
*
- * Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com)
+ * Copyright (c) 2009-2012 Dmitry Baranovskiy (http://g.raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
-(function(){var f=Math.min,a=Math.max;function e(o,m,h,p,j,k,l,i){var s,n={round:"round",sharp:"sharp",soft:"soft",square:"square"};if((j&&!p)||(!j&&!h)){return l?"":i.path()}k=n[k]||"square";p=Math.round(p);h=Math.round(h);o=Math.round(o);m=Math.round(m);switch(k){case"round":if(!j){var g=~~(p/2);if(h<g){g=h;s=["M",o+0.5,m+0.5-~~(p/2),"l",0,0,"a",g,~~(p/2),0,0,1,0,p,"l",0,0,"z"]}else{s=["M",o+0.5,m+0.5-g,"l",h-g,0,"a",g,g,0,1,1,0,p,"l",g-h,0,"z"]}}else{g=~~(h/2);if(p<g){g=p;s=["M",o-~~(h/2),m,"l",0,0,"a",~~(h/2),g,0,0,1,h,0,"l",0,0,"z"]}else{s=["M",o-g,m,"l",0,g-p,"a",g,g,0,1,1,h,0,"l",0,p-g,"z"]}}break;case"sharp":if(!j){var q=~~(p/2);s=["M",o,m+q,"l",0,-p,a(h-q,0),0,f(q,h),q,-f(q,h),q+(q*2<p),"z"]}else{q=~~(h/2);s=["M",o+q,m,"l",-h,0,0,-a(p-q,0),q,-f(q,p),q,f(q,p),q,"z"]}break;case"square":if(!j){s=["M",o,m+~~(p/2),"l",0,-p,h,0,0,p,"z"]}else{s=["M",o+~~(h/2),m,"l",1-h,0,0,-p,h-1,0,"z"]}break;case"soft":if(!j){g=f(h,Math.round(p/5));s=["M",o+0.5,m+0.5-~~(p/2),"l",h-g,0,"a",g,g,0,0,1,g,g,"l",0,p-g*2,"a",g,g,0,0,1,-g,g,"l",g-h,0,"z"]}else{g=f(Math.round(h/5),p);s=["M",o-~~(h/2),m,"l",0,g-p,"a",g,g,0,0,1,g,-g,"l",h-2*g,0,"a",g,g,0,0,1,g,g,"l",0,p-g,"z"]}}if(l){return s.join(",")}else{return i.path(s)}}function d(l,J,H,g,m,V,D){D=D||{};var z=this,W=D.type||"square",u=parseFloat(D.gutter||"20%"),T=l.set(),E=l.set(),n=l.set(),B=l.set(),F=Math.max.apply(Math,V),U=[],I=0,M=D.colors||z.colors,A=V.length;if(Raphael.is(V[0],"array")){F=[];I=A;A=0;for(var R=V.length;R--;){E.push(l.set());F.push(Math.max.apply(Math,V[R]));A=Math.max(A,V[R].length)}if(D.stacked){for(var R=A;R--;){var r=0;for(var Q=V.length;Q--;){r+=+V[Q][R]||0}U.push(r)}}for(var R=V.length;R--;){if(V[R].length<A){for(var Q=A;Q--;){V[R].push(0)}}}F=Math.max.apply(Math,D.stacked?U:F)}F=(D.to)||F;var K=g/(A*(100+u)+u)*100,k=K*u/100,p=D.vgutter==null?20:D.vgutter,C=[],q=J+k,o=(m-2*p)/F;if(!D.stretch){k=Math.round(k);K=Math.floor(K)}!D.stacked&&(K/=I||1);for(var R=0;R<A;R++){C=[];for(var Q=0;Q<(I||1);Q++){var S=Math.round((I?V[Q][R]:V[R])*o),t=H+m-p-S,O=e(Math.round(q+K/2),t+S,K,S,true,W,null,l).attr({stroke:"none",fill:M[I?Q:R]});if(I){E[Q].push(O)}else{E.push(O)}O.y=t;O.x=Math.round(q+K/2);O.w=K;O.h=S;O.value=I?V[Q][R]:V[R];if(!D.stacked){q+=K}else{C.push(O)}}if(D.stacked){var P;B.push(P=l.rect(C[0].x-C[0].w/2,H,K,m).attr(z.shim));P.bars=l.set();var v=0;for(var L=C.length;L--;){C[L].toFront()}for(var L=0,w=C.length;L<w;L++){var O=C[L],G,S=(v+O.value)*o,N=e(O.x,H+m-p-!!v*0.5,K,S,true,W,1,l);P.bars.push(O);v&&O.attr({path:N});O.h=S;O.y=H+m-p-!!v*0.5-S;n.push(G=l.rect(O.x-O.w/2,O.y,K,O.value*o).attr(z.shim));G.bar=O;G.value=O.value;v+=O.value}q+=K}q+=k}B.toFront();q=J+k;if(!D.stacked){for(var R=0;R<A;R++){for(var Q=0;Q<(I||1);Q++){var G;n.push(G=l.rect(Math.round(q),H+p,K,m-p).attr(z.shim));G.bar=I?E[Q][R]:E[R];G.value=G.bar.value;q+=K}q+=k}}T.label=function(y,Z){y=y||[];this.labels=l.set();var aa,h=-Infinity;if(D.stacked){for(var x=0;x<A;x++){var X=0;for(var s=0;s<(I||1);s++){X+=I?V[s][x]:V[x];if(s==I-1){var ab=l.labelise(y[x],X,F);aa=l.text(E[x*(I||1)+s].x,H+m-p/2,ab).attr(txtattr).insertBefore(n[x*(I||1)+s]);var Y=aa.getBBox();if(Y.x-7<h){aa.remove()}else{this.labels.push(aa);h=Y.x+Y.width}}}}}else{for(var x=0;x<A;x++){for(var s=0;s<(I||1);s++){var ab=l.labelise(I?y[s]&&y[s][x]:y[x],I?V[s][x]:V[x],F);aa=l.text(E[x*(I||1)+s].x,Z?H+m-p/2:E[x*(I||1)+s].y-10,ab).attr(txtattr).insertBefore(n[x*(I||1)+s]);var Y=aa.getBBox();if(Y.x-7<h){aa.remove()}else{this.labels.push(aa);h=Y.x+Y.width}}}}return this};T.hover=function(i,h){B.hide();n.show();n.mouseover(i).mouseout(h);return this};T.hoverColumn=function(i,h){n.hide();B.show();h=h||function(){};B.mouseover(i).mouseout(h);return this};T.click=function(h){B.hide();n.show();n.click(h);return this};T.each=function(j){if(!Raphael.is(j,"function")){return this}for(var h=n.length;h--;){j.call(n[h])}return this};T.eachColumn=function(j){if(!Raphael.is(j,"function")){return this}for(var h=B.length;h--;){j.call(B[h])}return this};T.clickColumn=function(h){n.hide();B.show();B.click(h);return this};T.push(E,n,B);T.bars=E;T.covers=n;return T}function b(w,v,u,I,F,l,B){B=B||{};var h=this,n=B.type||"square",o=parseFloat(B.gutter||"20%"),D=w.set(),H=w.set(),q=w.set(),L=w.set(),T=Math.max.apply(Math,l),g=[],J=0,t=B.colors||h.colors,O=l.length;if(Raphael.is(l[0],"array")){T=[];J=O;O=0;for(var N=l.length;N--;){H.push(w.set());T.push(Math.max.apply(Math,l[N]));O=Math.max(O,l[N].length)}if(B.stacked){for(var N=O;N--;){var z=0;for(var M=l.length;M--;){z+=+l[M][N]||0}g.push(z)}}for(var N=l.length;N--;){if(l[N].length<O){for(var M=O;M--;){l[N].push(0)}}}T=Math.max.apply(Math,B.stacked?g:T)}T=(B.to)||T;var Q=Math.floor(F/(O*(100+o)+o)*100),r=Math.floor(Q*o/100),p=[],k=u+r,m=(I-1)/T;!B.stacked&&(Q/=J||1);for(var N=0;N<O;N++){p=[];for(var M=0;M<(J||1);M++){var S=J?l[M][N]:l[N],P=e(v,k+Q/2,Math.round(S*m),Q-1,false,n,null,w).attr({stroke:"none",fill:t[J?M:N]});if(J){H[M].push(P)}else{H.push(P)}P.x=v+Math.round(S*m);P.y=k+Q/2;P.w=Math.round(S*m);P.h=Q;P.value=+S;if(!B.stacked){k+=Q}else{p.push(P)}}if(B.stacked){var A=w.rect(v,p[0].y-p[0].h/2,I,Q).attr(h.shim);L.push(A);A.bars=w.set();var E=0;for(var C=p.length;C--;){p[C].toFront()}for(var C=0,K=p.length;C<K;C++){var P=p[C],R,S=Math.round((E+P.value)*m),G=e(v,P.y,S,Q-1,false,n,1,w);A.bars.push(P);E&&P.attr({path:G});P.w=S;P.x=v+S;q.push(R=w.rect(v+E*m,P.y-P.h/2,P.value*m,Q).attr(h.shim));R.bar=P;E+=P.value}k+=Q}k+=r}L.toFront();k=u+r;if(!B.stacked){for(var N=0;N<O;N++){for(var M=0;M<(J||1);M++){var R=w.rect(v,k,I,Q).attr(h.shim);q.push(R);R.bar=J?H[M][N]:H[N];R.value=R.bar.value;k+=Q}k+=r}}D.label=function(Z,W){Z=Z||[];this.labels=w.set();for(var V=0;V<O;V++){for(var U=0;U<J;U++){var y=w.labelise(J?Z[U]&&Z[U][V]:Z[V],J?l[U][V]:l[V],T),Y=W?H[V*(J||1)+U].x-Q/2+3:v+5,x=W?"end":"start",s;this.labels.push(s=w.text(Y,H[V*(J||1)+U].y,y).attr(txtattr).attr({"text-anchor":x}).insertBefore(q[0]));if(s.getBBox().x<v+5){s.attr({x:v+5,"text-anchor":"start"})}else{H[V*(J||1)+U].label=s}}}return this};D.hover=function(j,i){L.hide();q.show();i=i||function(){};q.mouseover(j).mouseout(i);return this};D.hoverColumn=function(j,i){q.hide();L.show();i=i||function(){};L.mouseover(j).mouseout(i);return this};D.each=function(s){if(!Raphael.is(s,"function")){return this}for(var j=q.length;j--;){s.call(q[j])}return this};D.eachColumn=function(s){if(!Raphael.is(s,"function")){return this}for(var j=L.length;j--;){s.call(L[j])}return this};D.click=function(i){L.hide();q.show();q.click(i);return this};D.clickColumn=function(i){q.hide();L.show();L.click(i);return this};D.push(H,q,L);D.bars=H;D.covers=q;return D}var c=function(){};c.prototype=Raphael.g;b.prototype=d.prototype=new c;Raphael.fn.hbarchart=function(h,l,j,g,i,k){return new b(this,h,l,j,g,i,k)};Raphael.fn.barchart=function(h,l,j,g,i,k){return new d(this,h,l,j,g,i,k)}})();
+(function(){function B(f,m,i,b,a,h,n,A){var c;if(a&&!b||!a&&!i)return n?"":A.path();h={round:"round",sharp:"sharp",soft:"soft",square:"square"}[h]||"square";b=Math.round(b);i=Math.round(i);f=Math.round(f);m=Math.round(m);switch(h){case "round":a?(a=~~(i/2),c=b<a?["M",f-~~(i/2),m,"l",0,0,"a",~~(i/2),b,0,0,1,i,0,"l",0,0,"z"]:["M",f-a,m,"l",0,a-b,"a",a,a,0,1,1,i,0,"l",0,b-a,"z"]):(a=~~(b/2),c=i<a?["M",f+0.5,m+0.5-~~(b/2),"l",0,0,"a",i,~~(b/2),0,0,1,0,b,"l",0,0,"z"]:["M",f+0.5,m+0.5-a,"l",i-a,0,"a",a,
+a,0,1,1,0,b,"l",a-i,0,"z"]);break;case "sharp":a?(a=~~(i/2),c=["M",f+a,m,"l",-i,0,0,-C(b-a,0),a,-y(a,b),a,y(a,b),a,"z"]):(a=~~(b/2),c=["M",f,m+a,"l",0,-b,C(i-a,0),0,y(a,i),a,-y(a,i),a+(2*a<b),"z"]);break;case "square":c=a?["M",f+~~(i/2),m,"l",1-i,0,0,-b,i-1,0,"z"]:["M",f,m+~~(b/2),"l",0,-b,i,0,0,b,"z"];break;case "soft":a?(a=y(Math.round(i/5),b),c=["M",f-~~(i/2),m,"l",0,a-b,"a",a,a,0,0,1,a,-a,"l",i-2*a,0,"a",a,a,0,0,1,a,a,"l",0,b-a,"z"]):(a=y(i,Math.round(b/5)),c=["M",f+0.5,m+0.5-~~(b/2),"l",i-a,
+0,"a",a,a,0,0,1,a,a,"l",0,b-2*a,"a",a,a,0,0,1,-a,a,"l",a-i,0,"z"])}return n?c.join(","):A.path(c)}function E(f,m,i,b,a,h,n){var n=n||{},A=n.type||"square",c=parseFloat(n.gutter||"20%"),s=f.set(),u=f.set(),p=f.set(),t=f.set(),w=Math.max.apply(Math,h),g=[],l=0,y=n.colors||this.colors,q=h.length;if(Raphael.is(h[0],"array")){for(var w=[],l=q,q=0,e=h.length;e--;)u.push(f.set()),w.push(Math.max.apply(Math,h[e])),q=Math.max(q,h[e].length);if(n.stacked)for(e=q;e--;){for(var k=0,d=h.length;d--;)k+=+h[d][e]||
+0;g.push(k)}for(e=h.length;e--;)if(h[e].length<q)for(d=q;d--;)h[e].push(0);w=Math.max.apply(Math,n.stacked?g:w)}var w=n.to||w,b=100*(b/(q*(100+c)+c)),c=b*c/100,r=null==n.vgutter?20:n.vgutter,g=[],k=m+c,v=(a-2*r)/w;n.stretch||(c=Math.round(c),b=Math.floor(b));!n.stacked&&(b/=l||1);for(e=0;e<q;e++){g=[];for(d=0;d<(l||1);d++){var j=Math.round((l?h[d][e]:h[e])*v),x=i+a-r-j,o=B(Math.round(k+b/2),x+j,b,j,!0,A,null,f).attr({stroke:"none",fill:y[l?d:e]});l?u[d].push(o):u.push(o);o.y=x;o.x=Math.round(k+b/
+2);o.w=b;o.h=j;o.value=l?h[d][e]:h[e];n.stacked?g.push(o):k+=b}if(n.stacked){t.push(d=f.rect(g[0].x-g[0].w/2,i,b,a).attr(this.shim));d.bars=f.set();for(var x=0,z=g.length;z--;)g[z].toFront();for(var z=0,D=g.length;z<D;z++){var o=g[z],j=(x+o.value)*v,H=B(o.x,i+a-r-0.5*!!x,b,j,!0,A,1,f);d.bars.push(o);x&&o.attr({path:H});o.h=j;o.y=i+a-r-0.5*!!x-j;p.push(j=f.rect(o.x-o.w/2,o.y,b,o.value*v).attr(this.shim));j.bar=o;j.value=o.value;x+=o.value}k+=b}k+=c}t.toFront();k=m+c;if(!n.stacked)for(e=0;e<q;e++){for(d=
+0;d<(l||1);d++)p.push(j=f.rect(Math.round(k),i+r,b,a-r).attr(this.shim)),j.bar=l?u[d][e]:u[e],j.value=j.bar.value,k+=b;k+=c}s.label=function(b,e){b=b||[];this.labels=f.set();var d,j=-Infinity;if(n.stacked)for(var c=0;c<q;c++)for(var m=0,g=0;g<(l||1);g++){m=m+(l?h[g][c]:h[c]);if(g==l-1){d=f.labelise(b[c],m,w);d=f.text(u[c*(l||1)+g].x,i+a-r/2,d).attr(txtattr).insertBefore(p[c*(l||1)+g]);var k=d.getBBox();if(k.x-7<j)d.remove();else{this.labels.push(d);j=k.x+k.width}}}else for(c=0;c<q;c++)for(g=0;g<(l||
+1);g++){d=f.labelise(l?b[g]&&b[g][c]:b[c],l?h[g][c]:h[c],w);d=f.text(u[c*(l||1)+g].x,e?i+a-r/2:u[c*(l||1)+g].y-10,d).attr(txtattr).insertBefore(p[c*(l||1)+g]);k=d.getBBox();if(k.x-7<j)d.remove();else{this.labels.push(d);j=k.x+k.width}}return this};s.hover=function(a,b){t.hide();p.show();p.mouseover(a).mouseout(b);return this};s.hoverColumn=function(a,b){p.hide();t.show();t.mouseover(a).mouseout(b||function(){});return this};s.click=function(a){t.hide();p.show();p.click(a);return this};s.each=function(a){if(!Raphael.is(a,
+"function"))return this;for(var b=p.length;b--;)a.call(p[b]);return this};s.eachColumn=function(a){if(!Raphael.is(a,"function"))return this;for(var b=t.length;b--;)a.call(t[b]);return this};s.clickColumn=function(a){p.hide();t.show();t.click(a);return this};s.push(u,p,t);s.bars=u;s.covers=p;return s}function F(f,m,i,b,a,h,n){var n=n||{},y=n.type||"square",c=parseFloat(n.gutter||"20%"),s=f.set(),u=f.set(),p=f.set(),t=f.set(),w=Math.max.apply(Math,h),g=[],l=0,C=n.colors||this.colors,q=h.length;if(Raphael.is(h[0],
+"array")){for(var w=[],l=q,q=0,e=h.length;e--;)u.push(f.set()),w.push(Math.max.apply(Math,h[e])),q=Math.max(q,h[e].length);if(n.stacked)for(e=q;e--;){for(var k=0,d=h.length;d--;)k+=+h[d][e]||0;g.push(k)}for(e=h.length;e--;)if(h[e].length<q)for(d=q;d--;)h[e].push(0);w=Math.max.apply(Math,n.stacked?g:w)}var w=n.to||w,r=Math.floor(100*(a/(q*(100+c)+c))),a=Math.floor(r*c/100),c=[],g=i+a,k=(b-1)/w;!n.stacked&&(r/=l||1);for(e=0;e<q;e++){c=[];for(d=0;d<(l||1);d++){var v=l?h[d][e]:h[e],j=B(m,g+r/2,Math.round(v*
+k),r-1,!1,y,null,f).attr({stroke:"none",fill:C[l?d:e]});l?u[d].push(j):u.push(j);j.x=m+Math.round(v*k);j.y=g+r/2;j.w=Math.round(v*k);j.h=r;j.value=+v;n.stacked?c.push(j):g+=r}if(n.stacked){d=f.rect(m,c[0].y-c[0].h/2,b,r).attr(this.shim);t.push(d);d.bars=f.set();for(var x=0,o=c.length;o--;)c[o].toFront();for(var o=0,z=c.length;o<z;o++){var j=c[o],v=Math.round((x+j.value)*k),D=B(m,j.y,v,r-1,!1,y,1,f);d.bars.push(j);x&&j.attr({path:D});j.w=v;j.x=m+v;p.push(v=f.rect(m+x*k,j.y-j.h/2,j.value*k,r).attr(this.shim));
+v.bar=j;x+=j.value}g+=r}g+=a}t.toFront();g=i+a;if(!n.stacked)for(e=0;e<q;e++){for(d=0;d<(l||1);d++)v=f.rect(m,g,b,r).attr(this.shim),p.push(v),v.bar=l?u[d][e]:u[e],v.value=v.bar.value,g+=r;g+=a}s.label=function(a,b){a=a||[];this.labels=f.set();for(var c=0;c<q;c++)for(var d=0;d<l;d++){var e=f.labelise(l?a[d]&&a[d][c]:a[c],l?h[d][c]:h[c],w),g=b?"end":"start";this.labels.push(e=f.text(b?u[c*(l||1)+d].x-r/2+3:m+5,u[c*(l||1)+d].y,e).attr(txtattr).attr({"text-anchor":g}).insertBefore(p[0]));e.getBBox().x<
+m+5?e.attr({x:m+5,"text-anchor":"start"}):u[c*(l||1)+d].label=e}return this};s.hover=function(a,b){t.hide();p.show();p.mouseover(a).mouseout(b||function(){});return this};s.hoverColumn=function(a,b){p.hide();t.show();t.mouseover(a).mouseout(b||function(){});return this};s.each=function(a){if(!Raphael.is(a,"function"))return this;for(var b=p.length;b--;)a.call(p[b]);return this};s.eachColumn=function(a){if(!Raphael.is(a,"function"))return this;for(var b=t.length;b--;)a.call(t[b]);return this};s.click=
+function(a){t.hide();p.show();p.click(a);return this};s.clickColumn=function(a){p.hide();t.show();t.click(a);return this};s.push(u,p,t);s.bars=u;s.covers=p;return s}var y=Math.min,C=Math.max,G=function(){};G.prototype=Raphael.g;F.prototype=E.prototype=new G;Raphael.fn.barchart=function(f,m,i,b,a,h){return new E(this,f,m,i,b,a,h)};Raphael.fn.hbarchart=function(f,m,i,b,a,h){return new F(this,f,m,i,b,a,h)}})();
View
@@ -1,7 +1,11 @@
/*!
- * g.Raphael 0.5 - Charting library, based on Raphaël
+ * g.Raphael 0.51 - Charting library, based on Raphaël
*
- * Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com)
+ * Copyright (c) 2009-2012 Dmitry Baranovskiy (http://g.raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
-(function(){var b=function(g,f,e,d){return"hsb("+[Math.min((1-g/f)*0.4,1),e||0.75,d||0.75]+")"};function a(e,N,M,d,j,B,A,t,I){var v=this;function U(g){+g[0]&&(g[0]=v.axis(N+s,M+s,d-2*s,E,p,I.axisxstep||Math.floor((d-2*s)/20),2,I.axisxlabels||null,I.axisxtype||"t",null,e));+g[1]&&(g[1]=v.axis(N+d-s,M+j-s,j-2*s,D,o,I.axisystep||Math.floor((j-2*s)/20),3,I.axisylabels||null,I.axisytype||"t",null,e));+g[2]&&(g[2]=v.axis(N+s,M+j-s+H,d-2*s,E,p,I.axisxstep||Math.floor((d-2*s)/20),0,I.axisxlabels||null,I.axisxtype||"t",null,e));+g[3]&&(g[3]=v.axis(N+s-H,M+j-s,j-2*s,D,o,I.axisystep||Math.floor((j-2*s)/20),1,I.axisylabels||null,I.axisytype||"t",null,e))}I=I||{};var z=v.snapEnds(Math.min.apply(Math,B),Math.max.apply(Math,B),B.length-1),E=z.from,p=z.to,s=I.gutter||10,L=v.snapEnds(Math.min.apply(Math,A),Math.max.apply(Math,A),A.length-1),D=L.from,o=L.to,C=Math.max(B.length,A.length,t.length),w=e[I.symbol]||"circle",J=e.set(),u=e.set(),G=I.max||100,r=Math.max.apply(Math,t),q=[],Q=Math.sqrt(r/Math.PI)*2/G;for(var S=0;S<C;S++){q[S]=Math.min(Math.sqrt(t[S]/Math.PI)*2/Q,G)}s=Math.max.apply(Math,q.concat(s));var F=e.set(),H=Math.max.apply(Math,q);if(I.axis){var n=(I.axis+"").split(/[,\s]+/);U.call(v,n);var T=[],V=[];for(var S=0,K=n.length;S<K;S++){var W=n[S].all?n[S].all.getBBox()[["height","width"][S%2]]:0;T[S]=W+s;V[S]=W}s=Math.max.apply(Math,T.concat(s));for(var S=0,K=n.length;S<K;S++){if(n[S].all){n[S].remove();n[S]=1}}U.call(v,n);for(var S=0,K=n.length;S<K;S++){if(n[S].all){F.push(n[S].all)}}J.axis=F}var P=(d-s*2)/((p-E)||1),O=(j-s*2)/((o-D)||1);for(var S=0,K=A.length;S<K;S++){var h=e.raphael.is(w,"array")?w[S]:w,m=N+s+(B[S]-E)*P,l=M+j-s-(A[S]-D)*O;h&&q[S]&&u.push(e[h](m,l,q[S]).attr({fill:I.heat?b(q[S],H):v.colors[0],"fill-opacity":I.opacity?q[S]/G:1,stroke:"none"}))}var f=e.set();for(var S=0,K=A.length;S<K;S++){var m=N+s+(B[S]-E)*P,l=M+j-s-(A[S]-D)*O;f.push(e.circle(m,l,H).attr(v.shim));I.href&&I.href[S]&&f[S].attr({href:I.href[S]});f[S].r=+q[S].toFixed(3);f[S].x=+m.toFixed(3);f[S].y=+l.toFixed(3);f[S].X=B[S];f[S].Y=A[S];f[S].value=t[S]||0;f[S].dot=u[S]}J.covers=f;J.series=u;J.push(u,F,f);J.hover=function(i,g){f.mouseover(i).mouseout(g);return this};J.click=function(g){f.click(g);return this};J.each=function(k){if(!e.raphael.is(k,"function")){return this}for(var g=f.length;g--;){k.call(f[g])}return this};J.href=function(x){var k;for(var g=f.length;g--;){k=f[g];if(k.X==x.x&&k.Y==x.y&&k.value==x.value){k.attr({href:x.href})}}};return J}var c=function(){};c.prototype=Raphael.g;a.prototype=new c;Raphael.fn.dotchart=function(e,k,g,d,j,i,f,h){return new a(this,e,k,g,d,j,i,f,h)}})();
+(function(){function s(e,n,o,p,g,k,h,r,c){function s(a){+a[0]&&(a[0]=j.axis(n+b,o+b,p-2*b,t,C,c.axisxstep||Math.floor((p-2*b)/20),2,c.axisxlabels||null,c.axisxtype||"t",null,e));+a[1]&&(a[1]=j.axis(n+p-b,o+g-b,g-2*b,u,D,c.axisystep||Math.floor((g-2*b)/20),3,c.axisylabels||null,c.axisytype||"t",null,e));+a[2]&&(a[2]=j.axis(n+b,o+g-b+x,p-2*b,t,C,c.axisxstep||Math.floor((p-2*b)/20),0,c.axisxlabels||null,c.axisxtype||"t",null,e));+a[3]&&(a[3]=j.axis(n+b-x,o+g-b,g-2*b,u,D,c.axisystep||Math.floor((g-2*
+b)/20),1,c.axisylabels||null,c.axisytype||"t",null,e))}for(var c=c||{},j=this,l=j.snapEnds(Math.min.apply(Math,k),Math.max.apply(Math,k),k.length-1),t=l.from,C=l.to,b=c.gutter||10,l=j.snapEnds(Math.min.apply(Math,h),Math.max.apply(Math,h),h.length-1),u=l.from,D=l.to,v=Math.max(k.length,h.length,r.length),l=e[c.symbol]||"circle",m=e.set(),y=e.set(),E=c.max||100,a=Math.max.apply(Math,r),q=[],i=2*Math.sqrt(a/Math.PI)/E,a=0;a<v;a++)q[a]=Math.min(2*Math.sqrt(r[a]/Math.PI)/i,E);var b=Math.max.apply(Math,
+q.concat(b)),v=e.set(),x=Math.max.apply(Math,q);if(c.axis){var f=(c.axis+"").split(/[,\s]+/);s.call(j,f);for(var w=[],a=0,i=f.length;a<i;a++){var z=f[a].all?f[a].all.getBBox()[["height","width"][a%2]]:0;w[a]=z+b}b=Math.max.apply(Math,w.concat(b));a=0;for(i=f.length;a<i;a++)f[a].all&&(f[a].remove(),f[a]=1);s.call(j,f);a=0;for(i=f.length;a<i;a++)f[a].all&&v.push(f[a].all);m.axis=v}f=(p-2*b)/(C-t||1);w=(g-2*b)/(D-u||1);a=0;for(i=h.length;a<i;a++){var z=e.raphael.is(l,"array")?l[a]:l,A=n+b+(k[a]-t)*f,
+B=o+g-b-(h[a]-u)*w;z&&q[a]&&y.push(e[z](A,B,q[a]).attr({fill:c.heat?"hsb("+[Math.min(0.4*(1-q[a]/x),1),0.75,0.75]+")":j.colors[0],"fill-opacity":c.opacity?q[a]/E:1,stroke:"none"}))}for(var d=e.set(),a=0,i=h.length;a<i;a++)A=n+b+(k[a]-t)*f,B=o+g-b-(h[a]-u)*w,d.push(e.circle(A,B,x).attr(j.shim)),c.href&&c.href[a]&&d[a].attr({href:c.href[a]}),d[a].r=+q[a].toFixed(3),d[a].x=+A.toFixed(3),d[a].y=+B.toFixed(3),d[a].X=k[a],d[a].Y=h[a],d[a].value=r[a]||0,d[a].dot=y[a];m.covers=d;m.series=y;m.push(y,v,d);
+m.hover=function(a,b){d.mouseover(a).mouseout(b);return this};m.click=function(a){d.click(a);return this};m.each=function(a){if(!e.raphael.is(a,"function"))return this;for(var b=d.length;b--;)a.call(d[b]);return this};m.href=function(a){for(var b,c=d.length;c--;)b=d[c],b.X==a.x&&(b.Y==a.y&&b.value==a.value)&&b.attr({href:a.href})};return m}var F=function(){};F.prototype=Raphael.g;s.prototype=new F;Raphael.fn.dotchart=function(e,n,o,p,g,k,h,r){return new s(this,e,n,o,p,g,k,h,r)}})();
Oops, something went wrong.

0 comments on commit b0290af

Please sign in to comment.