|
|
|
!function(a){"use strict";function b(a){return a||0===a}function c(a){return"undefined"==typeof a}function d(a){return"undefined"!=typeof a}function e(a,b){function c(a,b){a.attr("transform",function(a){return"translate("+Math.ceil(b(a)+s)+", 0)"})}function d(a,b){a.attr("transform",function(a){return"translate(0,"+Math.ceil(b(a))+")"})}function e(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function f(a){var b,c,d=[];if(a.ticks)return a.ticks.apply(a,k);for(c=a.domain(),b=Math.ceil(c[0]);b<c[1];b++)d.push(b);return d.length>0&&d[0]>0&&d.unshift(d[0]-(d[1]-d[0])),d}function g(){var a,c=m.copy();return b&&(a=m.domain(),c.domain([a[0],a[1]-1])),c}function h(a){var c=b&&a<u.length?u[a]:a;return j?j(c):c}function i(i){i.each(function(){function i(a){var b=m(a)+s;return B[0]<b&&b<B[1]?o:0}var j,k,t=a.select(this),u=this.__chart__||m,v=this.__chart__=g(),w=r?r:f(v),x=t.selectAll(".tick").data(w,v),y=x.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),z=a.transition(x.exit()).style("opacity",1e-6).remove(),A=a.transition(x).style("opacity",1),B=m.rangeExtent?m.rangeExtent():e(m.range()),C=t.selectAll(".domain").data([0]),D=(C.enter().append("path").attr("class","domain"),a.transition(C));y.append("line"),y.append("text");var E=y.select("line"),F=A.select("line"),G=x.select("text").text(h),H=y.select("text"),I=A.select("text");switch(b?(s=Math.ceil((v(1)-v(0))/2),k=l?0:s):s=k=0,n){case"bottom":j=c,E.attr("y2",o),H.attr("y",Math.max(o,0)+q),F.attr("x1",k).attr("x2",k).attr("y2",i),I.attr("x",0).attr("y",Math.max(o,0)+q),G.attr("dy",".71em").style("text-anchor","middle"),D.attr("d","M"+B[0]+","+p+"V0H"+B[1]+"V"+p);break;case"top":j=c,E.attr("y2",-o),H.attr("y",-(Math.max(o,0)+q)),F.attr("x2",0).attr("y2",-o),I.attr("x",0).attr("y",-(Math.max(o,0)+q)),G.attr("dy","0em").style("text-anchor","middle"),D.attr("d","M"+B[0]+","+-p+"V0H"+B[1]+"V"+-p);break;case"left":j=d,E.attr("x2",-o),H.attr("x",-(Math.max(o,0)+q)),F.attr("x2",-o).attr("y2",0),I.attr("x",-(Math.max(o,0)+q)).attr("y",s),G.attr("dy",".32em").style("text-anchor","end"),D.attr("d","M"+-p+","+B[0]+"H0V"+B[1]+"H"+-p);break;case"right":j=d,E.attr("x2",o),H.attr("x",Math.max(o,0)+q),F.attr("x2",o).attr("y2",0),I.attr("x",Math.max(o,0)+q).attr("y",0),G.attr("dy",".32em").style("text-anchor","start"),D.attr("d","M"+p+","+B[0]+"H0V"+B[1]+"H"+p)}if(v.rangeBand){var J=v,K=J.rangeBand()/2;u=v=function(a){return J(a)+K}}else u.rangeBand?u=v:z.call(j,v);y.call(j,u),A.call(j,v)})}var j,k,l,m=a.scale.linear(),n="bottom",o=6,p=6,q=3,r=null,s=0,t=!0,u=[];return i.scale=function(a){return arguments.length?(m=a,i):m},i.orient=function(a){return arguments.length?(n=a in{top:1,right:1,bottom:1,left:1}?a+"":"bottom",i):n},i.tickFormat=function(a){return arguments.length?(j=a,i):j},i.tickCentered=function(a){return arguments.length?(l=a,i):l},i.tickOffset=function(){return s},i.ticks=function(){return arguments.length?(k=arguments,i):k},i.tickCulling=function(a){return arguments.length?(t=a,i):t},i.tickValues=function(a){return arguments.length?(r=a,i):r},i.categories=function(a){return arguments.length?(u=a,i):u},i}var f={version:"0.1.42"},g={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",region:"c3-region",regions:"c3-regions",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-c
|
|
|
|
})}function Ze(a,b,c,d){a?Xe(b,c,d):Ye(b,c,d)}function $e(a,b,c,d){Ze(a,b,c.data,d)}function _e(a){return"circle"===a.nodeName?We:$f.select(a).classed(g.bar)?Ze:$e}function af(a){return a.filter(function(a){return b(a.value)})}function bf(a){return Ai&&!qe(a)?"function"==typeof Bi?Bi(a):Bi:0}function cf(a){return Di?Ei?Ei:1.75*bf(a):bf(a)}function df(a){return Fi?Fi:4*bf(a)}function ef(a,c){return(c?Yj.selectAll("."+g.circles+td(c)):Yj).selectAll("."+g.circle+(b(a)?"-"+a:""))}function ff(a,b){ef(a,b).classed(g.EXPANDED,!0).attr("r",cf)}function gf(a){ef(a).filter(function(){return $f.select(this).classed(g.EXPANDED)}).classed(g.EXPANDED,!1).attr("r",bf)}function hf(a){return Yj.selectAll("."+g.bar+(b(a)?"-"+a:""))}function jf(a){hf(a).classed(g.EXPANDED,!0)}function kf(a){hf(a).classed(g.EXPANDED,!1)}function lf(a,b){var c=$f.svg.area(),d=rf(a,b),e=b?ab:_,f=function(a,b){return fh.length>0?d(a,b)[0][1]:e(a.id)(0)},g=function(a,b){return fh.length>0?d(a,b)[1][1]:e(a.id)(a.value)};return c=Lh?c.x0(f).x1(g).y(Kd):c.x(Kd).y0(f).y1(g),function(a){var b,d,e=af(a.values);return se(a)?c.interpolate(Te(a))(e):(b=Rg(e[0].x),d=_(a.id)(e[0].value),Lh?"M "+d+" "+b:"M "+b+" "+d)}}function mf(a,b){var c=$f.svg.line(),d=tf(a,b),e=b?ab:_,f=b?Nd:Kd,g=function(a,b){return fh.length>0?d(a,b)[0][1]:e(a.id)(a.value)};return c=Lh?c.x(g).y(f):c.x(f).y(g),Gi||(c=c.defined(function(a){return null!=a.value})),function(a){var d=Gi?af(a.values):a.values,f=b?f:Ug,g=e(a.id),h=0,i=0;return pe(a)?lh[a.id]?uf(d,f,g,lh[a.id]):c.interpolate(Te(a))(d):(d[0]&&(h=f(d[0].x),i=g(d[0].value)),Lh?"M "+i+" "+h:"M "+h+" "+i)}}function nf(a,b){var c=sf(a,b);return function(a,b){var d=c(a,b),e=Lh?1:0,f=Lh?0:1,g="M "+d[0][e]+","+d[0][f]+" L"+d[1][e]+","+d[1][f]+" L"+d[2][e]+","+d[2][f]+" L"+d[3][e]+","+d[3][f]+" z";return g}}function of(a,b){var c=sf(a,!1),d=b?pf:qf;return function(a,b){return d(c(a,b),a,this)}}function pf(a,b){var c;return Lh?(c=te(b)?4:6,a[2][1]+c*(b.value<0?-1:1)):a[0][0]+(a[2][0]-a[0][0])/2}function qf(a,b,c){var d=c.getBoundingClientRect();return Lh?(a[0][0]+a[2][0]+.6*d.height)/2:a[2][1]+(b.value<0?d.height:te(b)?-3:-6)}function rf(a,b){var c=a.__max__+1,d=be(0,c,a,!!b),e=ce(!!b),f=de(se,a,!!b),g=b?ab:_;return function(a,b){var c=g(a.id)(0),h=f(a,b)||c,i=d(a),j=e(a);return Lh&&(0<a.value&&c>j||a.value<0&&j>c)&&(j=c),[[i,h],[i,j-(c-h)]]}}function sf(a,b){var c=a.__max__+1,d=ge(Xg,c),e=be(d,c,a,!!b),f=ce(!!b),g=de(te,a,!!b),h=b?ab:_;return function(a,b){var c=h(a.id)(0),i=g(a,b)||c,j=e(a),k=f(a);return Lh&&(0<a.value&&c>k||a.value<0&&k>c)&&(k=c),[[j,i],[j,k-(c-i)],[j+d,k-(c-i)],[j+d,i]]}}function tf(a,b){var c=a.__max__+1,d=be(0,c,a,!!b),e=ce(!!b),f=de(pe,a,!!b),g=b?ab:_;return function(a,b){var c=g(a.id)(0),h=f(a,b)||c,i=d(a),j=e(a);return Lh&&(0<a.value&&c>j||a.value<0&&j>c)&&(j=c),[[i,j-(c-h)]]}}function uf(a,b,e,f){var g,h,i,j,k,l,m,n,o,p,q,r,s=-1,t="M",u=[];if(d(f))for(g=0;g<f.length;g++)u[g]={},u[g].start=c(f[g].start)?a[0].x:rj?He(f[g].start):f[g].start,u[g].end=c(f[g].end)?a[a.length-1].x:rj?He(f[g].end):f[g].end;for(q=Lh?function(a){return e(a.value)}:function(a){return b(a.x)},r=Lh?function(a){return b(a.x)}:function(a){return e(a.value)},i=rj?function(a,c,d,f){var g=a.x.getTime(),h=c.x-a.x,i=new Date(g+h*d),j=new Date(g+h*(d+f));return"M"+b(i)+" "+e(k(d))+" "+b(j)+" "+e(k(d+f))}:function(a,c,d,f){return"M"+b(j(d),!0)+" "+e(k(d))+" "+b(j(d+f),!0)+" "+e(k(d+f))},g=0;g<a.length;g++){if(c(u)||!Ke(a[g].x,u))t+=" "+q(a[g])+" "+r(a[g]);else for(j=Y(a[g-1].x,a[g].x,rj),k=Y(a[g-1].value,a[g].value),l=b(a[g].x)-b(a[g-1].x),m=e(a[g].value)-e(a[g-1].value),n=Math.sqrt(Math.pow(l,2)+Math.pow(m,2)),o=2/n,p=2*o,h=o;1>=h;h+=p)t+=i(a[g-1],a[g],h,o);s=a[g].x}return t}function vf(b){var c=new MutationObserver(function(d){d.forEach(function(d){if("childList"===d.type&&d.previousSibling){c.disconnect();var e=a.setInterval(function(){b.node().parentNode&&(a.clearInterval(e),Ef({withUpdateTranslate:!0,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),b.transition().style("opacity",1)
|
|
|
|
}),dh=i(["data","names"],{}),eh=i(["data","classes"],{}),fh=i(["data","groups"],[]),gh=i(["data","axes"],{}),hh=i(["data","type"]),ih=i(["data","types"],{}),jh=i(["data","labels"],{}),kh=i(["data","order"]),lh=i(["data","regions"],{}),mh=i(["data","color"]),nh=i(["data","colors"],{}),oh=i(["data","hide"],!1),ph=i(["data","filter"]),qh=i(["data","selection","enabled"],!1),rh=i(["data","selection","grouped"],!1),sh=i(["data","selection","isselectable"],function(){return!0}),th=i(["data","selection","multiple"],!0),uh=i(["data","onclick"],function(){}),vh=i(["data","onenter"],function(){}),wh=i(["data","onleave"],function(){}),xh=i(["data","onselected"],function(){}),yh=i(["data","onunselected"],function(){}),zh=i(["data","ondragstart"],function(){}),Ah=i(["data","ondragend"],function(){}),Bh=i(["subchart","show"],!1),Ch=i(["subchart","size","height"],60),Dh=i(["color","pattern"],[]),Eh=i(["color","threshold"],{}),Fh=i(["legend","show"],!0),Gh=i(["legend","position"],"bottom"),Hh=i(["legend","item","onclick"]),Ih=i(["legend","item","onmouseover"]),Jh=i(["legend","item","onmouseout"]),Kh=i(["legend","equally"],!1),Lh=i(["axis","rotated"],!1),Mh=i(["axis","x","show"],!0),Nh=i(["axis","x","type"],"indexed"),Oh=i(["axis","x","localtime"],!0),Ph=i(["axis","x","categories"],[]),Qh=i(["axis","x","tick","centered"],!1),Rh=i(["axis","x","tick","format"]),Sh=i(["axis","x","tick","culling"],{}),Th=i(["axis","x","tick","culling","max"],10),Uh=i(["axis","x","tick","count"]),Vh=i(["axis","x","tick","fit"],!0),Wh=i(["axis","x","tick","values"],null),Xh=i(["axis","x","tick","rotate"]),Yh=i(["axis","x","max"],null),Zh=i(["axis","x","min"],null),$h=i(["axis","x","padding"],{}),_h=i(["axis","x","height"]),ai=i(["axis","x","default"]),bi=i(["axis","x","label"],{}),ci=i(["axis","y","show"],!0),di=i(["axis","y","max"]),ei=i(["axis","y","min"]),fi=i(["axis","y","center"]),gi=i(["axis","y","label"],{}),hi=i(["axis","y","inner"],!1),ii=i(["axis","y","tick","format"]),ji=i(["axis","y","padding"]),ki=i(["axis","y","ticks"],10),li=i(["axis","y2","show"],!1),mi=i(["axis","y2","max"]),ni=i(["axis","y2","min"]),oi=i(["axis","y2","center"]),pi=i(["axis","y2","label"],{}),qi=i(["axis","y2","inner"],!1),ri=i(["axis","y2","tick","format"]),si=i(["axis","y2","padding"]),ti=i(["axis","y2","ticks"],10),ui=i(["grid","x","show"],!1),vi=i(["grid","x","type"],"tick"),wi=i(["grid","x","lines"],[]),xi=i(["grid","y","show"],!1),yi=i(["grid","y","lines"],[]),zi=i(["grid","y","ticks"],10),Ai=i(["point","show"],!0),Bi=i(["point","r"],2.5),Ci=i(["point","focus","line","enabled"],!0),Di=i(["point","focus","expand","enabled"],!0),Ei=i(["point","focus","expand","r"]),Fi=i(["point","focus","select","r"]),Gi=i(["line","connect_null"],!1),Hi=i(["bar","width"]),Ii=i(["bar","width","ratio"],.6),Ji=i(["pie","label","show"],!0),Ki=i(["pie","label","format"]),Li=i(["pie","expand"],!0),Mi=i(["pie","onclick"],function(){}),Ni=i(["pie","onmouseover"],function(){}),Oi=i(["pie","onmouseout"],function(){}),Pi=i(["gauge","label","show"],!0),Qi=i(["gauge","label","format"]),Ri=i(["gauge","min"],0),Si=i(["gauge","max"],100),Ti=i(["gauge","onclick"],function(){}),Ui=i(["gauge","onmouseover"],function(){}),Vi=i(["gauge","onmouseout"],function(){}),Wi=i(["gauge","units"]),Xi=i(["gauge","width"]),Yi=i(["donut","label","show"],!0),Zi=i(["donut","label","format"]),$i=i(["donut","expand"],!0),_i=i(["donut","title"],""),aj=i(["donut","onclick"],function(){}),bj=i(["donut","onmouseover"],function(){}),cj=i(["donut","onmouseout"],function(){}),dj=i(["regions"],[]),ej=i(["tooltip","show"],!0),fj=i(["tooltip","format","title"]),gj=i(["tooltip","format","value"]),hj=i(["tooltip","contents"],function(a,b,c,d){var e,f,h,i,j,k,l=fj?fj:b,m=gj?gj:c;for(f=0;f<a.length;f++)a[f]&&(a[f].value||0===a[f].value)&&(e||(h=l?l(a[f].x):a[f].x,e="<table class='"+g.tooltip+"'>"+(h||0===h?"<tr><th colspan='2'>"+h+"</th></tr>":"")),j=a[f].name,i=m(a[f].value,a[f].ratio,a[f].id,a[f].index),k=Bj?Bj(a[f].value):d(a[f].id),e+="<tr class='"+g.tooltipName+"-"+a[f].id+"'>",e+="<td class='name'><span style='background-color:"+k+"'
|