|
|
|
!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 Ye(a,b,c,d){a?We(b,c,d):Xe(b,c,d)}function Ze(a,b,c,d){Ye(a,b,c.data,d)}function $e(a){return"circle"===a.nodeName?Ve:Zf.select(a).classed(g.bar)?Ye:Ze}function _e(a){return a.filter(function(a){return b(a.value)})}function af(a){return zi&&!pe(a)?"function"==typeof Ai?Ai(a):Ai:0}function bf(a){return Ci?Di?Di:1.75*af(a):af(a)}function cf(a){return Ei?Ei:4*af(a)}function df(a,c){return(c?Xj.selectAll("."+g.circles+sd(c)):Xj).selectAll("."+g.circle+(b(a)?"-"+a:""))}function ef(a,b){df(a,b).classed(g.EXPANDED,!0).attr("r",bf)}function ff(a){df(a).filter(function(){return Zf.select(this).classed(g.EXPANDED)}).classed(g.EXPANDED,!1).attr("r",af)}function gf(a){return Xj.selectAll("."+g.bar+(b(a)?"-"+a:""))}function hf(a){gf(a).classed(g.EXPANDED,!0)}function jf(a){gf(a).classed(g.EXPANDED,!1)}function kf(a,b){var c=Zf.svg.area(),d=qf(a,b),e=b?ab:_,f=function(a,b){return eh.length>0?d(a,b)[0][1]:e(a.id)(0)},g=function(a,b){return eh.length>0?d(a,b)[1][1]:e(a.id)(a.value)};return c=Kh?c.x0(f).x1(g).y(Jd):c.x(Jd).y0(f).y1(g),function(a){var b,d,e=_e(a.values);return re(a)?c.interpolate(Se(a))(e):(b=Qg(e[0].x),d=_(a.id)(e[0].value),Kh?"M "+d+" "+b:"M "+b+" "+d)}}function lf(a,b){var c=Zf.svg.line(),d=sf(a,b),e=b?ab:_,f=b?Md:Jd,g=function(a,b){return eh.length>0?d(a,b)[0][1]:e(a.id)(a.value)};return c=Kh?c.x(g).y(f):c.x(f).y(g),Fi||(c=c.defined(function(a){return null!=a.value})),function(a){var d=Fi?_e(a.values):a.values,f=b?f:Tg,g=e(a.id),h=0,i=0;return oe(a)?kh[a.id]?tf(d,f,g,kh[a.id]):c.interpolate(Se(a))(d):(d[0]&&(h=f(d[0].x),i=g(d[0].value)),Kh?"M "+i+" "+h:"M "+h+" "+i)}}function mf(a,b){var c=rf(a,b);return function(a,b){var d=c(a,b),e=Kh?1:0,f=Kh?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 nf(a,b){var c=rf(a,!1),d=b?of:pf;return function(a,b){return d(c(a,b),a,this)}}function of(a,b){var c;return Kh?(c=se(b)?4:6,a[2][1]+c*(b.value<0?-1:1)):a[0][0]+(a[2][0]-a[0][0])/2}function pf(a,b,c){var d=c.getBoundingClientRect();return Kh?(a[0][0]+a[2][0]+.6*d.height)/2:a[2][1]+(b.value<0?d.height:se(b)?-3:-6)}function qf(a,b){var c=a.__max__+1,d=ae(0,c,a,!!b),e=be(!!b),f=ce(re,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 Kh&&(0<a.value&&c>j||a.value<0&&j>c)&&(j=c),[[i,h],[i,j-(c-h)]]}}function rf(a,b){var c=a.__max__+1,d=fe(Wg,c),e=ae(d,c,a,!!b),f=be(!!b),g=ce(se,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 Kh&&(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 sf(a,b){var c=a.__max__+1,d=ae(0,c,a,!!b),e=be(!!b),f=ce(oe,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 Kh&&(0<a.value&&c>j||a.value<0&&j>c)&&(j=c),[[i,j-(c-h)]]}}function tf(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:qj?Ge(f[g].start):f[g].start,u[g].end=c(f[g].end)?a[a.length-1].x:qj?Ge(f[g].end):f[g].end;for(q=Kh?function(a){return e(a.value)}:function(a){return b(a.x)},r=Kh?function(a){return b(a.x)}:function(a){return e(a.value)},i=qj?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)||!Je(a[g].x,u))t+=" "+q(a[g])+" "+r(a[g]);else for(j=Y(a[g-1].x,a[g].x,qj),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 uf(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),Df({withUpdateTranslate:!0,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),b.transition().style("opacity",1)
|
|
|
|
}),ch=i(["data","names"],{}),dh=i(["data","classes"],{}),eh=i(["data","groups"],[]),fh=i(["data","axes"],{}),gh=i(["data","type"]),hh=i(["data","types"],{}),ih=i(["data","labels"],{}),jh=i(["data","order"]),kh=i(["data","regions"],{}),lh=i(["data","color"]),mh=i(["data","colors"],{}),nh=i(["data","hide"],!1),oh=i(["data","filter"]),ph=i(["data","selection","enabled"],!1),qh=i(["data","selection","grouped"],!1),rh=i(["data","selection","isselectable"],function(){return!0}),sh=i(["data","selection","multiple"],!0),th=i(["data","onclick"],function(){}),uh=i(["data","onenter"],function(){}),vh=i(["data","onleave"],function(){}),wh=i(["data","onselected"],function(){}),xh=i(["data","onunselected"],function(){}),yh=i(["data","ondragstart"],function(){}),zh=i(["data","ondragend"],function(){}),Ah=i(["subchart","show"],!1),Bh=i(["subchart","size","height"],60),Ch=i(["color","pattern"],[]),Dh=i(["color","threshold"],{}),Eh=i(["legend","show"],!0),Fh=i(["legend","position"],"bottom"),Gh=i(["legend","item","onclick"]),Hh=i(["legend","item","onmouseover"]),Ih=i(["legend","item","onmouseout"]),Jh=i(["legend","equally"],!1),Kh=i(["axis","rotated"],!1),Lh=i(["axis","x","show"],!0),Mh=i(["axis","x","type"],"indexed"),Nh=i(["axis","x","localtime"],!0),Oh=i(["axis","x","categories"],[]),Ph=i(["axis","x","tick","centered"],!1),Qh=i(["axis","x","tick","format"]),Rh=i(["axis","x","tick","culling"],{}),Sh=i(["axis","x","tick","culling","max"],10),Th=i(["axis","x","tick","count"]),Uh=i(["axis","x","tick","fit"],!0),Vh=i(["axis","x","tick","values"],null),Wh=i(["axis","x","tick","rotate"]),Xh=i(["axis","x","max"],null),Yh=i(["axis","x","min"],null),Zh=i(["axis","x","padding"],{}),$h=i(["axis","x","height"]),_h=i(["axis","x","default"]),ai=i(["axis","x","label"],{}),bi=i(["axis","y","show"],!0),ci=i(["axis","y","max"]),di=i(["axis","y","min"]),ei=i(["axis","y","center"]),fi=i(["axis","y","label"],{}),gi=i(["axis","y","inner"],!1),hi=i(["axis","y","tick","format"]),ii=i(["axis","y","padding"]),ji=i(["axis","y","ticks"],10),ki=i(["axis","y2","show"],!1),li=i(["axis","y2","max"]),mi=i(["axis","y2","min"]),ni=i(["axis","y2","center"]),oi=i(["axis","y2","label"],{}),pi=i(["axis","y2","inner"],!1),qi=i(["axis","y2","tick","format"]),ri=i(["axis","y2","padding"]),si=i(["axis","y2","ticks"],10),ti=i(["grid","x","show"],!1),ui=i(["grid","x","type"],"tick"),vi=i(["grid","x","lines"],[]),wi=i(["grid","y","show"],!1),xi=i(["grid","y","lines"],[]),yi=i(["grid","y","ticks"],10),zi=i(["point","show"],!0),Ai=i(["point","r"],2.5),Bi=i(["point","focus","line","enabled"],!0),Ci=i(["point","focus","expand","enabled"],!0),Di=i(["point","focus","expand","r"]),Ei=i(["point","focus","select","r"]),Fi=i(["line","connect_null"],!1),Gi=i(["bar","width"]),Hi=i(["bar","width","ratio"],.6),Ii=i(["pie","label","show"],!0),Ji=i(["pie","label","format"]),Ki=i(["pie","expand"],!0),Li=i(["pie","onclick"],function(){}),Mi=i(["pie","onmouseover"],function(){}),Ni=i(["pie","onmouseout"],function(){}),Oi=i(["gauge","label","show"],!0),Pi=i(["gauge","label","format"]),Qi=i(["gauge","min"],0),Ri=i(["gauge","max"],100),Si=i(["gauge","onclick"],function(){}),Ti=i(["gauge","onmouseover"],function(){}),Ui=i(["gauge","onmouseout"],function(){}),Vi=i(["gauge","units"]),Wi=i(["gauge","width"]),Xi=i(["donut","label","show"],!0),Yi=i(["donut","label","format"]),Zi=i(["donut","expand"],!0),$i=i(["donut","title"],""),_i=i(["donut","onclick"],function(){}),aj=i(["donut","onmouseover"],function(){}),bj=i(["donut","onmouseout"],function(){}),cj=i(["regions"],[]),dj=i(["tooltip","show"],!0),ej=i(["tooltip","format","title"]),fj=i(["tooltip","format","value"]),gj=i(["tooltip","contents"],function(a,b,c,d){var e,f,h,i,j,k,l=ej?ej:b,m=fj?fj: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=Aj?Aj(a[f].value):d(a[f].id),e+="<tr class='"+g.tooltipName+"-"+a[f].id+"'>",e+="<td class='name'><span style='background-color:"+k+"'
|