|
|
|
@ -6,9 +6,9 @@ C=e in{top:1,right:1,bottom:1,left:1}?e+"":"bottom";return p};p.categories=funct
|
|
|
|
|
O.c3={},e=O.d3;Ab.generate=function(ea){var pc,qc,Ha,Ia,p,q,C,M,$;function g(a,b){for(var c=ea,d=0;d<a.length;d++){if(!(a[d]in c))return b;c=c[a[d]]}return c}function va(){Bb=Ka?Ka:Q();wa=fa();q=0;C=(h?Cb+tc:0)+(bb?bb:cb?1:40);M=20+(h?0:Cb)+pa;$=db?db:Db?eb||h?1:40:1;r=Bb-C-$;s=wa-q-M;Ha=h?q:wa-Cb-pa;Ia=h?uc:C;p=20+pa;Eb=h?C-uc-tc:r;fb=h?s:wa-Ha-p;pc=wa-pa;qc=C;S()}function S(){Fb=s/2;La=0.95*Fb;Gb=ia(k.data.targets,"donut")?0.6*La:0}function fa(){var a=Hb?Hb:+e.select(xa).style("height").replace("px", |
|
|
|
|
"");return 0<a?a:320}function Q(){return+e.select(xa).style("width").replace("px","")}function W(){return r+2+C+$}function oa(){return 40}function Ab(){return C+20}function xd(){return s-q+2}function X(){var a=h?s:r,b=ya(T)/ya(m.domain()),c=gb();return 1<c?a*b/(c-1):a}function Y(){Ib=h?1:0;Jb=h?s:r;Kb=h?0:s;Lb=h?r:1;Mb=h?0:fb;Nb=h?Eb:1;m=ha(Ib,Jb,v(m)?m.domain():void 0,function(){return J.tickOffset()});z=I(Kb,Lb,v(z)?z.domain():void 0);aa=I(Kb,Lb,v(aa)?aa.domain():void 0);U=ha(Ib,Jb,v(T)?T:void 0, |
|
|
|
|
function(a){return 0===a%1?hb.tickOffset():0});ib=I(Mb,Nb);jb=I(Mb,Nb);J=rc(m,zd);za=e.svg.axis().scale(z).orient(Ad);kb=e.svg.axis().scale(aa).orient(Bd);hb=rc(U,Cd);ga()}function ga(){lb=ab();vc=Ja();wc=Ja(0.98)}function ha(a,b,c,d){var f=(D?e.time.scale():e.scale.linear()).range([a,b]);f.orgDomain=function(){return f.domain()};v(c)&&f.domain(c);y(d)&&(d=function(){return 0});if(ja){var H=f,t,f=function(a){return H(a)+d(a)};for(t in H)f[t]=H[t];f.orgDomain=function(){return H.domain()};f.domain= |
|
|
|
|
function(a){if(!arguments.length)return a=H.domain(),[a[0],a[1]+1];H.domain(a);return f}}return f}function I(a,b){return e.scale.linear().range([a,b])}function u(a){return"y2"===R(a)?aa:z}function B(a){return"y2"===R(a)?jb:ib}function rc(a,b){var c=(ja?wd():e.svg.axis()).scale(a).orient(b);c.tickFormat(sc());ja?c.categories(Ma).tickCentered(Dd):c.tickOffset=function(){return 0};return c}function R(a){return a in xc?xc[a]:"y"}function sc(){var a=D?Ed:ja?Fd:function(a){return a};mb&&(a="function"=== |
|
|
|
|
typeof mb?mb:D?function(a){return e.time.format(mb)(a)}:a);return a}function Z(a){var b=!1;Ob(k.data.targets).forEach(function(c){b||c.data.id!==a.data.id||(b=!0,a=c)});return b?a:null}function ab(){var a=e.svg.arc().outerRadius(La).innerRadius(Gb),b=function(b,d){var f;return d?a(b):(f=Z(b))?a(f):"M 0 0"};b.centroid=a.centroid;return b}function Ja(a){var b=e.svg.arc().outerRadius(Fb*(a?a:1)).innerRadius(Gb);return function(a){return(a=Z(a))?b(a):"M 0 0"}}function zb(a){a=Z(a);var b,c;b="";a&&(b= |
|
|
|
|
lb.centroid(a),a=b[0],b=b[1],c=Math.sqrt(a*a+b*b),b="translate("+0.8*(a/c)*La+","+0.8*(b/c)*La+")");return b}function yd(a){return Gd(a,(a.endAngle-a.startAngle)/(2*Math.PI))}function yc(a,b){var c=n.selectAll(".chart-arc"+ka(a)),d=n.selectAll(".-arc").filter(function(b){return b.data.id!==a});c.selectAll("path").transition().duration(50).attr("d",vc).transition().duration(100).attr("d",wc).each(function(a){Pb(a.data)});b||d.style("opacity",0.3)}function Qb(a){n.selectAll(".chart-arc"+ka(a)).selectAll("path").transition().duration(50).attr("d", |
|
|
|
|
function(a){if(!arguments.length)return a=H.domain(),[a[0],a[1]+1];H.domain(a);return f}}return f}function I(a,b){return e.scale.linear().range([a,b])}function u(a){return"y2"===R(a)?aa:z}function B(a){return"y2"===R(a)?jb:ib}function rc(a,b){var c=(ja?wd():e.svg.axis()).scale(a).orient(b);c.tickFormat(sc());ja?c.categories(Ma).tickCentered(Dd):c.tickOffset=function(){return 0};return c}function R(a){return a in xc?xc[a]:"y"}function sc(){var a=D?Ed:ja?Fd:null;mb&&("function"===typeof mb?a=mb:D&& |
|
|
|
|
(a=function(a){return e.time.format(mb)(a)}));return a}function Z(a){var b=!1;Ob(k.data.targets).forEach(function(c){b||c.data.id!==a.data.id||(b=!0,a=c)});return b?a:null}function ab(){var a=e.svg.arc().outerRadius(La).innerRadius(Gb),b=function(b,d){var f;return d?a(b):(f=Z(b))?a(f):"M 0 0"};b.centroid=a.centroid;return b}function Ja(a){var b=e.svg.arc().outerRadius(Fb*(a?a:1)).innerRadius(Gb);return function(a){return(a=Z(a))?b(a):"M 0 0"}}function zb(a){a=Z(a);var b,c;b="";a&&(b=lb.centroid(a), |
|
|
|
|
a=b[0],b=b[1],c=Math.sqrt(a*a+b*b),b="translate("+0.8*(a/c)*La+","+0.8*(b/c)*La+")");return b}function yd(a){return Gd(a,(a.endAngle-a.startAngle)/(2*Math.PI))}function yc(a,b){var c=n.selectAll(".chart-arc"+ka(a)),d=n.selectAll(".-arc").filter(function(b){return b.data.id!==a});c.selectAll("path").transition().duration(50).attr("d",vc).transition().duration(100).attr("d",wc).each(function(a){Pb(a.data)});b||d.style("opacity",0.3)}function Qb(a){n.selectAll(".chart-arc"+ka(a)).selectAll("path").transition().duration(50).attr("d", |
|
|
|
|
lb);n.selectAll(".-arc").style("opacity",1)}function Hd(a){var b=zc(a),c,d,f,H;if(0<w.length)for(H=Ac(a),a=0;a<w.length;a++)for(d=w[a][0],H&&b[d]&&b[d].forEach(function(a,c){b[d][c]=0>a?a:0}),c=1;c<w[a].length;c++)f=w[a][c],b[f]&&b[f].forEach(function(a,c){R(f)!==R(d)||!b[d]||H&&0<+a||(b[d][c]+=+a)});return e.min(Object.keys(b).map(function(a){return e.min(b[a])}))}function Id(a){var b=zc(a),c,d,f,H;if(0<w.length)for(H=Jd(a),a=0;a<w.length;a++)for(d=w[a][0],H&&b[d]&&b[d].forEach(function(a,c){b[d][c]= |
|
|
|
|
0<a?a:0}),c=1;c<w[a].length;c++)f=w[a][c],b[f]&&b[f].forEach(function(a,c){R(f)!==R(d)||!b[d]||H&&0>+a||(b[d][c]+=+a)});return e.max(Object.keys(b).map(function(a){return e.max(b[a])}))}function nb(a){var b=ob(function(b){return R(b.id)===a}),c="y2"===a?Kd:Ld,d="y2"===a?Md:Nd,c=c?c:Hd(b),d=d?d:Id(b),f=0.1*Math.abs(d-c),e=f,g=f,h="y2"===a?Od:Pd;h&&(c=Math.max(Math.abs(c),Math.abs(d)),d=c-h,c=h-c);"y"===a&&Na&&(e=Na.top?Na.top:f,g=Na.bottom?Na.bottom:f);"y2"===a&&Oa&&(e=Oa.top?Oa.top:f,g=Oa.bottom? |
|
|
|
|
Oa.bottom:f);ia(b,"bar")&&!Ac(b)&&(g=c);return[c-g,d+e]}function Qd(a){return e.min(a,function(a){return e.min(a.values,function(a){return a.x})})}function Rd(a){return e.max(a,function(a){return e.max(a.values,function(a){return a.x})})}function pb(a){var b=[Qd(a),Rd(a)];a=b[0];var b=b[1],c=ja?0:0.01*Math.abs(a-b);a=D?new Date(a.getTime()-c):a-c;b=D?new Date(b.getTime()+c):b+c;return[a,b]}function ya(a){return a[1]-a[0]}function Sd(a){for(var b=0;b<a.length;b++)if(!(a[b]in qb))return!1;return!0} |
|
|
|
@ -71,8 +71,8 @@ function(a){return a}),Pa=g(["data","names"],{}),w=g(["data","groups"],[]),xc=g(
|
|
|
|
|
"width"],80),Ke=g(["legend","item","onclick"],function(){}),vd=g(["axis","x","type"],"indexed"),Ma=g(["axis","x","categories"],[]),Dd=g(["axis","x","tick","centered"],!1),mb=g(["axis","x","tick","format"],null),vb=g(["axis","x","default"],null),te=g(["axis","x","label"],null),Nd=g(["axis","y","max"],null),Ld=g(["axis","y","min"],null),Pd=g(["axis","y","center"],null),ue=g(["axis","y","label"],null),cb=g(["axis","y","inner"],!1),cc=g(["axis","y","tick","format"],null),Na=g(["axis","y","padding"],null), |
|
|
|
|
oe=g(["axis","y","ticks"],10),Db=g(["axis","y2","show"],!1),Md=g(["axis","y2","max"],null),Kd=g(["axis","y2","min"],null),Od=g(["axis","y2","center"],null),eb=g(["axis","y2","inner"],!1),qe=g(["axis","y2","tick","format"],null),Oa=g(["axis","y2","padding"],null),pe=g(["axis","y2","ticks"],10),h=g(["axis","rotated"],!1),jd=g(["grid","x","show"],!1),Ee=g(["grid","x","type"],"tick"),ec=g(["grid","x","lines"],null),kd=g(["grid","y","show"],!1),fc=g(["grid","y","lines"],null),ac=g(["point","show"],!0)? |
|
|
|
|
g(["point","r"],2.5):0,ve=g(["point","focus","line","enabled"],!0),gc=g(["point","focus","expand","enabled"],!0),hc=g(["point","focus","expand","r"],gc?4:ac),Wa=g(["point","focus","select","r"],8),Ce=g(["point","onclick"],function(){}),ke=g(["point","onselected"],function(){}),le=g(["point","onunselected"],function(){}),Gd=g(["arc","label","format"],function(a,b){return(100*b).toFixed(1)+"%"}),we=g(["arc","title"],""),P=g(["regions"],[]),Vc=g(["tooltip","enabled"],!0),Wc=g(["tooltip","contents"], |
|
|
|
|
function(a){var b="<table class='-tooltip'><tr><th colspan='2'>"+sc()(a[0].x)+"</th></tr>",c,d,e,g=cc?cc:function(a){return+a};for(c=0;c<a.length;c++)if(a[c]&&(a[c].value||0===a[c].value)){d="-";if(a[c].value||0===a[c].value)d=g(a[c].value);e=a[c].name;b+="<tr class='-tooltip-name-"+a[c].id+"'><td class='name'><span style='background-color:"+N(a[c].id)+"'></span>"+e+"</td><td class='value'>"+d+"</td></tr>"}return b+"</table>"}),ye=g(["tooltip","init","show"],!1),Ga=g(["tooltip","init","x"],0),md= |
|
|
|
|
g(["tooltip","init","position"],{top:"0px",left:"50px"}),dc=xa.replace("#","")+"-clip",Xa="url("+document.URL+"#"+dc+")",D="timeseries"===vd,ja="categorized"===vd,Sb=!D&&(ra||ba),jc=null,Ya=!1,ic=!1,pa=Fa?40:0,N=function(a,b){var c=[],d=null!==b?b:"#1f77b4 #ff7f0e #2ca02c #d62728 #9467bd #8c564b #e377c2 #7f7f7f #bcbd22 #17becf".split(" ");return function(b){if(b in a)return a[b];-1===c.indexOf(b)&&c.push(b);return d[c.indexOf(b)%d.length]}}(Le,Me),Ed=function(){var a=[[e.time.format("%Y/%-m/%-d"), |
|
|
|
|
function(a){var b=cc?cc:function(a){return+a},c=sc(),c="<table class='-tooltip'><tr><th colspan='2'>"+(c?c(a[0].x):a[0].x)+"</th></tr>",d,e,g;for(d=0;d<a.length;d++)if(a[d]&&(a[d].value||0===a[d].value)){e="-";if(a[d].value||0===a[d].value)e=b(a[d].value);g=a[d].name;c+="<tr class='-tooltip-name-"+a[d].id+"'><td class='name'><span style='background-color:"+N(a[d].id)+"'></span>"+g+"</td><td class='value'>"+e+"</td></tr>"}return c+"</table>"}),ye=g(["tooltip","init","show"],!1),Ga=g(["tooltip","init", |
|
|
|
|
"x"],0),md=g(["tooltip","init","position"],{top:"0px",left:"50px"}),dc=xa.replace("#","")+"-clip",Xa="url("+document.URL+"#"+dc+")",D="timeseries"===vd,ja="categorized"===vd,Sb=!D&&(ra||ba),jc=null,Ya=!1,ic=!1,pa=Fa?40:0,N=function(a,b){var c=[],d=null!==b?b:"#1f77b4 #ff7f0e #2ca02c #d62728 #9467bd #8c564b #e377c2 #7f7f7f #bcbd22 #17becf".split(" ");return function(b){if(b in a)return a[b];-1===c.indexOf(b)&&c.push(b);return d[c.indexOf(b)%d.length]}}(Le,Me),Ed=function(){var a=[[e.time.format("%Y/%-m/%-d"), |
|
|
|
|
function(){return!0}],[e.time.format("%-m/%-d"),function(a){return a.getMonth()}],[e.time.format("%-m/%-d"),function(a){return 1!==a.getDate()}],[e.time.format("%-m/%-d"),function(a){return a.getDay()&&1!==a.getDate()}],[e.time.format("%I %p"),function(a){return a.getHours()}],[e.time.format("%I:%M"),function(a){return a.getMinutes()}],[e.time.format(":%S"),function(a){return a.getSeconds()}],[e.time.format(".%L"),function(a){return a.getMilliseconds()}]];return function(b){for(var c=a.length-1,d= |
|
|
|
|
a[c];!d[1](b);)d=a[--c];return d[0](b)}}(),r,Eb,s,fb,Bb,wa,La,Fb,Gb,lb,vc,wc,Ob,Ib,Jb,Kb,Lb,Mb,Nb,m,z,aa,U,ib,jb,J,za,kb,hb,zd=h?"left":"bottom",Ad=h?cb?"top":"bottom":cb?"right":"left",Bd=h?eb?"bottom":"top":eb?"left":"right",Cd=h?"left":"bottom",L={main:function(){return"translate("+C+","+q+")"},context:function(){return"translate("+Ia+","+Ha+")"},legend:function(){return"translate("+qc+","+pc+")"},y2:function(){return"translate("+(h?0:r)+","+(h?10:0)+")"},x:function(){return"translate(0,"+s+")"}, |
|
|
|
|
subx:function(){return"translate(0,"+(h?0:fb)+")"},arc:function(){return"translate("+r/2+","+s/2+")"}},uc=40,tc=20;Ob=e.layout.pie().value(function(a){return a.values.reduce(function(a,c){return a+c.value},0)});var Fe=function(){var a=e.svg.line().x(h?function(a){return u(a.id)(a.value)}:Aa).y(h?Aa:function(a){return u(a.id)(a.value)});return function(b){var c=Yb(b.values),d;if(Vb(b))return Zc(b)?a.interpolate("cardinal"):a.interpolate("linear"),ud[b.id]?ne(c,m,u(b.id),ud[b.id]):a(c);d=m(c[0].x); |
|
|
|
|