mirror of https://github.com/masayuki0812/c3.git
Quite good looking graph derived from d3.js
http://c3js.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
72 KiB
1 lines
72 KiB
(function(e){"use strict";function r(e){return e||e===0}function i(e){return typeof e==="undefined"}function s(e){return typeof e!=="undefined"}var t={version:"0.1.27"};var n={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",gaugeArc:"c3-gauge-arc",gaugeArcs:"c3-gauge-arcs",gaugeArcsTitle:"c3-gauge-arcs-title",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",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",step:"c3-step",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",area:"c3-area",text:"c3-text",texts:"c3-texts",grid:"c3-grid",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"};t.generate=function(t){function f(e,n){if(!(e in t)){throw Error(n)}}function l(e,n){var r=t,i,s,o;for(i=0;i<e.length;i++){if(typeof r==="object"&&!(e[i]in r)){return n}s=i===e.length-1;o=r[e[i]];if(!s&&typeof o!=="object"||s&&typeof n!=="object"&&typeof o==="object"&&o!==null){return n}r=o}return r}function Br(e){return"url("+document.URL.split("#")[0]+"#"+e+")"}function jr(){xa.attr("transform",Mr.main);xa.select("."+n.axisX).attr("transform",Mr.x);xa.select("."+n.axisY).attr("transform",Mr.y);xa.select("."+n.axisY2).attr("transform",Mr.y2);xa.select("."+n.chartArcs).attr("transform",Mr.arc)}function Fr(){if(Q){Ta.attr("transform",Mr.context);Ta.select("."+n.axisX).attr("transform",Mr.subx)}}function Ir(e){var t=e!==false?250:0;if(tt){Na.transition().duration(t).attr("transform",Mr.legend)}}function qr(e){jr(e);Fr(e);Ir(e)}function Wr(){Yn=$r();Zn=Jr();er=yi();tr=gi();Xn={top:st?Yr("y2"):zr,right:Qr(),bottom:Yr(st?"y":"x")+(st?0:G)+(_r?0:er),left:(st?G+Ur:0)+Kr()};Jn=Yn-Xn.left-Xn.right;Qn=Zn-Xn.top-Xn.bottom;if(Jn<0){Jn=0}if(Qn<0){Qn=0}Vn={top:st?Xn.top:Zn-G-(_r?0:er),right:NaN,bottom:20+(_r?0:er),left:st?Rr:Xn.left};Kn=st?Xn.left-Rr-Ur:Jn;Gn=st?Qn:Zn-Vn.top-Vn.bottom;if(Kn<0){Kn=0}if(Gn<0){Gn=0}$n={top:_r?0:Zn-er,right:NaN,bottom:0,left:_r?Yn-tr:0};Xr();if(_r&&Su(u.data.targets)){$n.left=Jn/2+rr}}function Xr(){rr=Qn/2;nr=rr*.95;var e=pn?(nr-pn)/nr:.6;ir=Eu(u.data.targets)||wu(u.data.targets)?nr*e:0}function Vr(){var e=st?n.axisX:n.axisY,t=o.select("."+e).node(),r=t?t.getBoundingClientRect():{right:0},i=o.select(c).node().getBoundingClientRect(),s=r.right-i.left-Kr();return s>0?s:0}function $r(){return h?h:Zr()}function Jr(){var e=p?p:ei();return e>0?e:320}function Kr(){if(Su(u.data.targets)){return 0}else if(d){return d}else{return st||!yt||xt?1:Gr("y")}}function Qr(){var e=1;if(Su(u.data.targets)){return 0}else if(v){return v}else if(_r){return tr+(kt&&!st?Gr("y2"):e)}else if(kt){return _t||st?e:Gr("y2")}else{return e}}function Gr(e){var t=Bi(e);return t.isInner?20+ts(e):40+ts(e)}function Yr(e){if(e==="y"&&!yt){return tt&&!_r?10:1}if(e==="y2"&&!kt){return zr}return(Bi(e).isInner?30:40)+(e==="y2"?-10:0)}function Zr(){return+o.select(c).style("width").replace("px","")}function ei(){return+o.select(c).style("height").replace("px","")}function ti(e){return e?-(1+4):-(Xn.left-1)}function ni(e){return e?-20:-1}function ri(){return ti(!st)}function ii(){return ni(!st)}function si(){return ti(st)}function oi(){return ni(st)}function ui(e){return e?Jn+2+4:Xn.left+20}function ai(e){return e?80:Qn+2}function fi(){return ui(!st)}function li(){return ai(!st)}function ci(){return ui(st)}function hi(){return ai(st)}function pi(){var e=st?Qn:Jn,t=Ks(),n=xs()*(gu(u.data.targets)?(t-(Hn?.25:1))/t:.98);return t>1?e*n/(t-1):e}function di(e){Dr=e}function vi(e){Pr=e}function mi(e){Hr=e}function gi(){return tt?_r?Pr*(Dr+1):Yn:0}function yi(){return tt?_r?Zn:Hr*(Dr+1):0}function bi(){var e,t=!gr;fr=st?1:0;lr=st?Qn:Jn;cr=st?0:Qn;hr=st?Jn:1;pr=fr;dr=lr;vr=st?0:Gn;mr=st?Kn:1;gr=Ei(fr,lr,t?undefined:gr.domain(),function(){return xr.tickOffset()});yr=Si(cr,hr);br=Si(cr,hr);wr=Ei(fr,lr,La,function(e){return e%1?0:Cr.tickOffset()});Er=Si(vr,mr);Sr=Si(vr,mr);e=Li();xr=Ni(gr,kr,e);Cr=Ni(wr,Or,e);Tr=Ci(yr,Lr,Tt,Ct);Nr=Ci(br,Ar,Dt,Ht);if(!t){ba.scale(wr);if(m){wa.scale(gr)}}wi()}function wi(){sr=ss();or=os();ur=os(.98)}function Ei(e,t,n,r){var u=(Pn?o.time.scale():o.scale.linear()).range([e,t]);u.orgDomain=function(){return u.domain()};if(s(n)){u.domain(n)}if(i(r)){r=function(){return 0}}if(Hn){var a=u,f;u=function(e){return a(e)+r(e)};for(f in a){u[f]=a[f]}u.orgDomain=function(){return a.domain()};u.domain=function(e){if(!arguments.length){e=a.domain();return[e[0],e[1]+1]}a.domain(e);return u}}return u}function Si(e,t){return o.scale.linear().range([e,t])}function xi(e){return ki(e)==="y2"?br:yr}function Ti(e){return ki(e)==="y2"?Sr:Er}function Ni(e,t,n){var r=(Hn?rs():o.svg.axis()).scale(e).orient(t);r.tickFormat(n);if(Hn){r.tickCentered(at)}else{r.tickOffset=function(){var e=st?Qn:Jn;return e*xs()/Ks()/2}}if(Hn){r.categories(ut)}return r}function Ci(e,t,n,r){return o.svg.axis().scale(e).orient(t).tickFormat(n).ticks(r).outerTickSize(0)}function ki(e){return e in L?L[e]:"y"}function Li(){var e=Pn?zn:Hn?lo:function(e){return e<0?e.toFixed(0):e};if(ft){if(typeof ft==="function"){e=ft}else if(Pn){e=function(e){return o.time.format(ft)(e)}}}return e}function Ai(e){var t;if(e==="y"){t=St}else if(e==="y2"){t=Mt}else if(e==="x"){t=gt}return t}function Oi(e){var t=Ai(e);return typeof t==="string"?t:t?t.text:null}function Mi(e,t){var n=Ai(e);if(typeof n==="string"){if(e==="y"){St=t}else if(e==="y2"){Mt=t}else if(e==="x"){gt=t}}else if(n){n.text=t}}function _i(e,t){var n=Ai(e),r=n&&typeof n==="object"&&n.position?n.position:t;return{isInner:r.indexOf("inner")>=0,isOuter:r.indexOf("outer")>=0,isLeft:r.indexOf("left")>=0,isCenter:r.indexOf("center")>=0,isRight:r.indexOf("right")>=0,isTop:r.indexOf("top")>=0,isMiddle:r.indexOf("middle")>=0,isBottom:r.indexOf("bottom")>=0}}function Di(){return _i("x",st?"inner-top":"inner-right")}function Pi(){return _i("y",st?"inner-right":"inner-top")}function Hi(){return _i("y2",st?"inner-right":"inner-top")}function Bi(e){return e==="y2"?Hi():e==="y"?Pi():Di()}function ji(){return Oi("x")}function Fi(){return Oi("y")}function Ii(){return Oi("y2")}function qi(e,t){if(e){return t.isLeft?0:t.isCenter?Jn/2:Jn}else{return t.isBottom?-Qn:t.isMiddle?-Qn/2:0}}function Ri(e,t){if(e){return t.isLeft?"0.5em":t.isRight?"-0.5em":"0"}else{return t.isTop?"-0.5em":t.isBottom?"0.5em":"0"}}function Ui(e,t){if(e){return t.isLeft?"start":t.isCenter?"middle":"end"}else{return t.isBottom?"start":t.isMiddle?"middle":"end"}}function zi(){return qi(!st,Di())}function Wi(){return qi(st,Pi())}function Xi(){return qi(st,Hi())}function Vi(){return Ri(!st,Di())}function $i(){return Ri(st,Pi())}function Ji(){return Ri(st,Hi())}function Ki(){var e=Di();if(st){return e.isInner?"1.2em":-30-ts("x")}else{return e.isInner?"-0.5em":"3em"}}function Qi(){var e=Pi();if(st){return e.isInner?"-0.5em":"3em"}else{return e.isInner?"1.2em":-20-ts("y")}}function Gi(){var e=Hi();if(st){return e.isInner?"1.2em":"-2.2em"}else{return e.isInner?"-0.5em":30+ts("y2")}}function Yi(){return Ui(!st,Di())}function Zi(){return Ui(st,Pi())}function es(){return Ui(st,Hi())}function ts(e){var t=0,r=e==="x"?n.axisX:e==="y"?n.axisY:n.axisY2;o.selectAll("."+r+" .tick text").each(function(){var e=this.getBBox();if(t<e.width){t=e.width}});return t<20?20:t}function ns(){xa.select("."+n.axisX+" ."+n.axisXLabel).attr("x",zi).text(ji);xa.select("."+n.axisY+" ."+n.axisYLabel).attr("x",Wi).attr("dy",Qi).text(Fi);xa.select("."+n.axisY2+" ."+n.axisY2Label).attr("x",Xi).attr("dy",Gi).text(Ii)}function rs(){function h(e,t){e.attr("transform",function(e){return"translate("+(t(e)+a)+", 0)"})}function p(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function d(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function v(e){var t=[];for(var n=Math.ceil(e[0]);n<e[1];n++){t.push(n)}if(t.length>0&&t[0]>0){t.unshift(t[0]-(t[1]-t[0]))}return t}function m(e,t){var n=e.length-1;return n<=u||t%Math.ceil(n/u)===0}function g(e){return e<c.length?c[e]:e}function y(e){var t=g(e);return f?f(t):t}function b(u){u.each(function(){var u=o.select(this);var f=v(e.domain());var l=u.selectAll(".tick.major").data(f,String),c=l.enter().insert("g","path").attr("class","tick major").style("opacity",1e-6),g=o.transition(l.exit()).style("opacity",1e-6).remove(),b=o.transition(l).style("opacity",1),w,E;var S=e.rangeExtent?e.rangeExtent():d(e.range()),x=u.selectAll(".domain").data([0]);x.enter().append("path").attr("class","domain");var T=o.transition(x);var N=e.copy(),C=this.__chart__||N;this.__chart__=N;c.append("line");c.append("text");var k=c.select("line"),L=b.select("line"),A=l.select("text"),O=c.select("text"),M=b.select("text");a=(N(1)-N(0))/2;E=s?0:a;switch(t){case"bottom":{w=h;k.attr("y2",n);O.attr("y",Math.max(n,0)+i);L.attr("x1",E).attr("x2",E).attr("y2",n);M.attr("x",0).attr("y",Math.max(n,0)+i);A.attr("dy",".71em").style("text-anchor","middle");A.text(function(e){return m(f,e)?y(e):""});T.attr("d","M"+S[0]+","+r+"V0H"+S[1]+"V"+r);break};case"left":{w=p;k.attr("x2",-n);O.attr("x",-(Math.max(n,0)+i));L.attr("x2",-n).attr("y2",0);M.attr("x",-(Math.max(n,0)+i)).attr("y",a);A.attr("dy",".32em").style("text-anchor","end");A.text(function(e){return m(f,e)?y(e):""});T.attr("d","M"+ -r+","+S[0]+"H0V"+S[1]+"H"+ -r);break}}if(e.ticks){c.call(w,C);b.call(w,N);g.call(w,N)}else{var _=N.rangeBand()/2,D=function(e){return N(e)+_};c.call(w,D);b.call(w,D)}})}var e=o.scale.linear(),t="bottom";var n=6,r=6,i=3,s=false,u=10,a=0,f=null,l=true;var c=[];b.scale=function(t){if(!arguments.length){return e}e=t;return b};b.orient=function(e){if(!arguments.length){return t}t=e in{top:1,right:1,bottom:1,left:1}?e+"":"bottom";return b};b.categories=function(e){if(!arguments.length){return c}c=e;return b};b.tickCentered=function(e){if(!arguments.length){return s}s=e;return b};b.tickFormat=function(e){if(!arguments.length){return f}f=e;return b};b.tickOffset=function(){return a};b.ticks=function(e){if(!arguments.length){return u}u=e;return b};b.tickCulling=function(e){if(!arguments.length){return l}l=e;return b};b.tickValues=function(){};return b}function is(e){var t=false;ar(to(u.data.targets)).forEach(function(n){if(!t&&n.data.id===e.data.id){t=true;e=n;return}});if(isNaN(e.endAngle))e.endAngle=e.startAngle;if(Ou(e.data)){var n=e.startAngle,r=e.endAngle;var i=un,s=on,o=Math.abs(i)+s,a=Math.abs(n)+r,f=Math.PI/o;e.startAngle=-1*(Math.PI/2)+f*Math.abs(i);e.endAngle=e.startAngle+f*e.value}return t?e:null}function ss(){var e=o.svg.arc().outerRadius(nr).innerRadius(ir),t=function(t,n){var r;if(n){return e(t)}r=is(t);return r?e(r):"M 0 0"};t.centroid=e.centroid;return t}function os(e){var t=o.svg.arc().outerRadius(rr*(e?e:1)).innerRadius(ir);return function(e){var n=is(e);return n?t(n):"M 0 0"}}function us(e,t){return _u(e.data)?sr(e,t):"M 0 0"}function as(e){var t=is(e),n,r,i,s,o="";if(t){n=sr.centroid(t);r=n[0],i=n[1],s=Math.sqrt(r*r+i*i);o=cn=="arc"?"translate(1,1)":"translate("+r/s*nr*.8+","+i/s*nr*.8+")"}return o}function fs(e){var t=cn=="arc"?Math.PI:Math.PI*2;return e?(e.endAngle-e.startAngle)/t:null}function ls(e){return Is({id:e.data.id,value:e.value,ratio:fs(e)})}function cs(e){var t,n,r,i;if(!ds()){return""}t=is(e);n=t?t.value:null;r=fs(t);i=vs();return i?i(n,r):Bo(n,r)}function hs(e,t){var r=Ea.selectAll("."+n.chartArc+Lo(e)),i=Ea.selectAll("."+n.arc).filter(function(t){return t.data.id!==e});r.selectAll("path.c3-arc").transition().duration(50).attr("d",or).transition().duration(100).attr("d",ur).each(function(e){if(Mu(e.data)){}});if(!t){i.style("opacity",.3)}}function ps(e){var t=Ea.selectAll("."+n.chartArc+Lo(e));t.selectAll("path.c3-arc").transition().duration(50).attr("d",sr);Ea.selectAll("."+n.arc).style("opacity",Z?Z:1)}function ds(){if(wu(u.data.targets)){return true}return Eu(u.data.targets)?dn:Gt}function vs(){if(wu(u.data.targets)){return sn}return Eu(u.data.targets)?vn:Yt}function ms(){return Eu(u.data.targets)?mn:""}function gs(){if(wu(u.data.targets)){return typeof an==="function"?an:function(){}}var e=Eu(u.data.targets)?gn:Zt;return typeof e==="function"?e:function(){}}function ys(){if(wu(u.data.targets)){return typeof fn==="function"?fn:function(){}}var e=Eu(u.data.targets)?yn:en;return typeof e==="function"?e:function(){}}function bs(){if(wu(u.data.targets)){return typeof ln==="function"?ln:function(){}}var e=Eu(u.data.targets)?bn:tn;return typeof e==="function"?e:function(){}}function ws(e){var t=Gs(e),n=oo(e),r,i,s,u,a,f;if(k.length>0){f=ao(e);for(r=0;r<k.length;r++){u=k[r].filter(function(e){return t.indexOf(e)>=0});if(u.length===0){continue}s=u[0];if(f&&n[s]){n[s].forEach(function(e,t){n[s][t]=e<0?e:0})}for(i=1;i<u.length;i++){a=u[i];if(!n[a]){continue}n[a].forEach(function(e,t){if(ki(a)===ki(s)&&n[s]&&!(f&&+e>0)){n[s][t]+=+e}})}}}return o.min(Object.keys(n).map(function(e){return o.min(n[e])}))}function Es(e){var t=Gs(e),n=oo(e),r,i,s,u,a,f;if(k.length>0){f=fo(e);for(r=0;r<k.length;r++){u=k[r].filter(function(e){return t.indexOf(e)>=0});if(u.length===0){continue}s=u[0];if(f&&n[s]){n[s].forEach(function(e,t){n[s][t]=e>0?e:0})}for(i=1;i<u.length;i++){a=u[i];if(!n[a]){continue}n[a].forEach(function(e,t){if(ki(a)===ki(s)&&n[s]&&!(f&&+e<0)){n[s][t]+=+e}})}}}return o.max(Object.keys(n).map(function(e){return o.max(n[e])}))}function Ss(e,t){var n=e.filter(function(e){return ki(e.id)===t}),i=t==="y2"?At:wt,s=t==="y2"?Lt:bt,o=r(i)?i:ws(n),u=r(s)?s:Es(n),a,f,l,c,h=t==="y2"?Ot:Et,p,d,v,m,g=Do()&&st;if(n.length===0){return t==="y2"?br.domain():yr.domain()}if(o===u){o<0?u=0:o=0}a=Math.abs(u-o);f=l=c=g?0:a*.1;if(h){p=Math.max(Math.abs(o),Math.abs(u));u=p-h;o=h-p}if(t==="y"&&Nt){l=r(Nt.top)?Nt.top:f;c=r(Nt.bottom)?Nt.bottom:f}if(t==="y2"&&Pt){l=r(Pt.top)?Pt.top:f;c=r(Pt.bottom)?Pt.bottom:f}if(g){d=Po(o,u);v=Ls(yr.range());m=[d[0]/v,d[1]/v];l+=a*(m[1]/(1-m[0]-m[1]));c+=a*(m[0]/(1-m[0]-m[1]))}if(gu(n)&&!ao(n)){c=o}if(Bt&&!ao(n)){c-=c}return[o-c,u+l]}function xs(e){var t=Ls(La),n=Ls(gr.domain());return e||n===0?1:t/n}function Ts(e){return vt?vt:o.min(e,function(e){return o.min(e.values,function(e){return e.x})})}function Ns(e){return dt?dt:o.max(e,function(e){return o.max(e.values,function(e){return e.x})})}function Cs(e,t){var n=t[0],r=t[1],i=Math.abs(n-r),s,o;if(Hn){o=0}else if(gu(e)){s=Ks();o=s>1?i/(s-1)/2:.5}else if(Bt){o=i*.001}else{o=i*.01}return o}function ks(e){var t=[Ts(e),Ns(e)],n=t[0],r=t[1],i=Cs(e,t),s=n==undefined?i:Pn?new Date(n.getTime()-i):n-i,o=r==undefined?i:Pn?new Date(r.getTime()+i):r+i;return[s,o]}function Ls(e){return e[1]-e[0]}function As(e){for(var t=0;t<e.length;t++){if(!(e[t]in a)){return false}}return true}function Os(e,t){a[e]=Vs(t)}function Ms(e){var t=[];for(var n=0;n<e.length;n++){if(e[n]in a){t.push(Vs(a[e[n]]))}}return t}function _s(e){return"start"in e?gr(Pn?Fu(e.start):e.start):0}function Ds(e){var t=_s(e),n="end"in e?gr(Pn?Fu(e.end):e.end):Jn,r=n-t;return r<0?0:r}function Ps(e){return S&&e===S||Uu(x)&&zu(x,e)}function Hs(e){return!Ps(e)}function Bs(e){return S?S:Uu(x)?x[e]:null}function js(e,t){return e in u.data.x&&u.data.x[e]&&u.data.x[e][t]?u.data.x[e][t]:t}function Fs(e){Object.keys(e).forEach(function(t){x[t]=e[t]})}function Is(e){var t;if(e){t=C[e.id];e.name=t?t:e.id}return e}function qs(e,t){e.forEach(function(e){e.values.forEach(function(n,r){n.x=Us(t[r],e.id,r)});u.data.x[e.id]=t})}function Rs(e,t){e.forEach(function(e){if(t[e.id]){qs([e],t[e.id])}})}function Us(e,t,n){var r;if(Pn){r=e?e instanceof Date?e:Fu(e):Fu(js(t,n))}else if(Bn&&!Hn){r=e?+e:js(t,n)}else{r=n}return r}function zs(e){var t=e[0],n={},r=[],i,s;for(i=1;i<e.length;i++){n={};for(s=0;s<e[i].length;s++){n[t[s]]=e[i][s]}r.push(n)}return r}function Ws(e){var t=[],n,r,s;for(n=0;n<e.length;n++){s=e[n][0];for(r=1;r<e[n].length;r++){if(i(t[r-1])){t[r-1]={}}t[r-1][s]=e[n][r]}}return t}function Xs(e){var t=o.keys(e[0]).filter(Hs),n=o.keys(e[0]).filter(Ps),r;t.forEach(function(t){var r=Bs(t);if(Bn||Pn){if(n.indexOf(r)>=0){u.data.x[t]=e.map(function(e){return e[r]})}}else{u.data.x[t]=e.map(function(e,t){return t})}});t.forEach(function(e){if(!u.data.x[e]){throw new Error('x is not defined for id = "'+e+'".')}});r=t.map(function(t,n){var r=N(t);return{id:r,id_org:t,values:e.map(function(e,i){var s=Bs(t),o=e[s],u=Us(o,t,i);if(Bn&&Hn&&n===0&&o){if(i===0){ut=[]}ut.push(o)}if(typeof e[t]==="undefined"){u=undefined}return{x:u,value:e[t]!==null&&!isNaN(e[t])?+e[t]:null,id:r}}).filter(function(e){return typeof e.x!=="undefined"})}});r.forEach(function(e){var t;e.values=e.values.sort(function(e,t){var n=e.x||e.x===0?e.x:Infinity,r=t.x||t.x===0?t.x:Infinity;return n-r});t=0;e.values.forEach(function(e){e.index=t++})});if(A){vu(Gs(r).filter(function(e){return!(e in O)}),A)}r.forEach(function(e){Os(e.id_org,e)});return r}function Vs(e){return{id:e.id,id_org:e.id_org,values:e.values.map(function(e){return{x:e.x,value:e.value,id:e.id}})}}function $s(e){return e>0&&u.data.targets[0].values[e-1]?u.data.targets[0].values[e-1].x:undefined}function Js(e){return e<Ks()-1?u.data.targets[0].values[e+1].x:undefined}function Ks(){return o.max(u.data.targets,function(e){return e.values.length})}function Qs(){var e=u.data.targets.length,t=0,n;if(e>1){u.data.targets.forEach(function(e){if(e.values.length>t){n=e;t=e.values.length}})}else{n=e?u.data.targets[0]:null}return n}function Gs(e){e=i(e)?u.data.targets:e;return e.map(function(e){return e.id})}function Ys(e){var t=Gs(),n;for(n=0;n<t.length;n++){if(t[n]===e){return true}}return false}function Zs(e){return s(e)?u.data.targets.filter(e):u.data.targets}function eo(e){return Wn.indexOf(e)<0}function to(e){return e.filter(function(e){return eo(e.id)})}function no(e){var t=o.set(o.merge(e.map(function(e){return e.values.map(function(e){return e.x})}))).values();return Pn?t.map(function(e){return new Date(e)}):t.map(function(e){return+e})}function ro(e){var t=e,n,r,i,s,o,u,a;if(!pt&&ht){n=typeof ht==="function"?ht():ht;if(n===1){t=[e[0]]}else if(n===2){t=[e[0],e[e.length-1]]}else if(n>2){s=n-2;r=e[0];i=e[e.length-1];o=(i-r)/(s+1);t=[r];for(u=0;u<s;u++){a=+r+o*(u+1);t.push(Pn?new Date(a):a)}t.push(i)}}return t}function io(e){Wn=Wn.concat(e)}function so(e){Wn=Wn.filter(function(t){return e.indexOf(t)<0})}function oo(e){var t={};e.forEach(function(e){t[e.id]=[];e.values.forEach(function(n){t[e.id].push(n.value)})});return t}function uo(e,t){var n=Object.keys(e),r,i,s;for(r=0;r<n.length;r++){s=e[n[r]].values;for(i=0;i<s.length;i++){if(t(s[i].value)){return true}}}return false}function ao(e){return uo(e,function(e){return e<0})}function fo(e){return uo(e,function(e){return e>0})}function lo(e){return e<ut.length?ut[e]:e}function co(e,t){return" "+e+" "+e+ko(t)}function ho(e){return co(n.text,e.id)}function po(e){return co(n.texts,e.id)}function vo(e,t){return co(n.shape,t)}function mo(e){return co(n.shapes,e.id)}function go(e){return mo(e)+co(n.line,e.id)}function yo(e,t){return vo(e,t)+co(n.circle,t)}function bo(e){return mo(e)+co(n.circles,e.id)}function wo(e,t){return vo(e,t)+co(n.bar,t)}function Eo(e){return mo(e)+co(n.bars,e.id)}function So(e){return mo(e.data)+co(n.arc,e.data.id)}function xo(e){return mo(e)+co(n.area,e.id)}function To(e,t){return co(n.region,t)+" "+("class"in e?e.class:"")}function No(e,t){return co(n.eventRect,t)}function Co(e){return mo(e)+co(n.step,e.id)}function ko(e){return e||e===0?"-"+(e.replace?e.replace(/([^a-zA-Z0-9-_])/g,"-"):e):""}function Lo(e){return"."+n.target+ko(e)}function Ao(e){return e.value!==null&&Oa[e.id]?1:0}function Oo(e){var t=_o(e);return Ao(e)*t}function Mo(e){return r(e.value)?Lu(e)?.5:1:0}function _o(){return Do()?1:0}function Do(){if(typeof M==="boolean"&&M){return true}else if(typeof M==="object"&&Uu(M)){return true}return false}function Po(e,t){var n=[],r=1.3;o.select("svg").selectAll(".dummy").data([e,t]).enter().append("text").text(function(e){return e}).each(function(e,t){var i=this.getBBox();n[t]=i.width*r}).remove();return n}function Ho(e){var t=Tt?Tt:function(e){return r(e)?+e:""};return t(e)}function Bo(e,t){return(t*100).toFixed(1)+"%"}function jo(e){var t=function(e){return r(e)?+e:""},n=ki(e),i=t;if(typeof M.format==="function"){i=M.format}else if(typeof M.format==="object"){if(typeof M.format[n]==="function"){i=M.format[n]}}return i}function Fo(e){return e?gr(e.x):null}function Io(e){return gr(Pn?Fu(e.value):e.value)}function qo(e){return yr(e.value)}function Ro(e){return wr(e.x)}function Uo(e,t){var n,r=e[t].x,i=[];for(n=t-1;n>=0;n--){if(r!==e[n].x){break}i.push(e[n])}for(n=t;n<e.length;n++){if(r!==e[n].x){break}i.push(e[n])}return i}function zo(e,t,n,r){var i=n?n:0,s=r?r:e.length-1,o=Math.floor((s-i)/2)+i,u=e[o],a=gr(u.x)-t[0],f;a>0?s=o:i=o;if(s-i===1||i===0&&s===0){f=[];if(e[i].x){f=f.concat(Uo(e,i))}if(e[s].x){f=f.concat(Uo(e,s))}return Xo(f,t)}return zo(e,t,i,s)}function Wo(e,t){var n;n=e.map(function(e){return zo(e.values,t)});return Xo(n,t)}function Xo(e,t){var n,r;e.forEach(function(e){var i=Wu(e,t);if(i<n||!n){n=i;r=e}});return r}function Vo(e){var t=e.getBoundingClientRect(),n=[e.pathSegList.getItem(0),e.pathSegList.getItem(1)],r=n[0].x,i=Math.min(n[0].y,n[1].y);return{x:r,y:i,width:t.width,height:t.height}}function $o(){return _&&_.toLowerCase()==="desc"}function Jo(){return _&&_.toLowerCase()==="asc"}function Ko(e){var t=Jo(),n=$o();if(t||n){e.sort(function(e,n){var r=function(e,t){return e+Math.abs(t.value)};var i=e.values.reduce(r,0),s=n.values.reduce(r,0);return t?s-i:i-s})}else if(typeof _==="function"){e.sort(_)}return e}function Qo(e,t){var n,i;var s,o,a,f,l;var c=Su(u.data.targets);var h=c&&!wu(u.data.targets)?Bo:Ho;var p=e.filter(function(e){return e&&r(e.value)});if(!En){return}if(p.length===0){return}Ca.html(Tn(e,Li(),h,Rn)).style("display","block");n=Ca.property("offsetWidth");i=Ca.property("offsetHeight");if(c){o=Jn/2+t[0];f=Qn/2+t[1]+20}else{if(st){s=Vr();o=s+t[0]+100;a=o+n;l=$r()-Qr();f=gr(p[0].x)+20}else{s=Vr();o=s+Kr()+gr(p[0].x)+20;a=o+n;l=s+$r()-Qr();f=t[1]+15}if(a>l){o-=n+60}if(f+i>Jr()){f-=i+30}}Ca.style("top",f+"px").style("left",o+"px")}function Go(){Ca.style("display","none")}function Yo(e){var t=e.filter(function(e){return e&&r(e.value)});if(!En){return}if(yu(u.data.targets)||Su(u.data.targets)){return}xa.selectAll("line."+n.xgridFocus).style("visibility","visible").data([t[0]]).attr(st?"y1":"x1",Fo).attr(st?"y2":"x2",Fo)}function Zo(){xa.select("line."+n.xgridFocus).style("visibility","hidden")}function eu(e){return e.x||e.x===0?gr(e.x):null}function tu(e,t){var n=cu(),r=va(n);if(k.length>0){var i=r(e,t);return i[0][1]}return xi(e.id)(e.value)}function nu(){var e={},t=0,n,r;to(Zs(ku)).forEach(function(s){for(n=0;n<k.length;n++){if(k[n].indexOf(s.id)<0){continue}for(r=0;r<k[n].length;r++){if(k[n][r]in e){e[s.id]=e[k[n][r]];break}}}if(i(e[s.id])){e[s.id]=t++}});e.__max__=t-1;return e}function ru(e,t,n,r){var i=r?wr:gr;return function(r){var s=r.id in n?n[r.id]:0;return r.x||r.x===0?i(r.x)-e*(t/2-s):0}}function iu(e){return function(t){var n=e?Ti(t.id):xi(t.id);return n(t.value)}}function su(e,t){var n=Ko(to(Zs(ku))),r=n.map(function(e){return e.id});return function(i,s){var o=t?Ti(i.id):xi(i.id),u=o(0),a=u;n.forEach(function(t){if(t.id===i.id||e[t.id]!==e[i.id]){return}if(r.indexOf(t.id)<r.indexOf(i.id)&&t.values[s].value*i.value>0){a+=o(t.values[s].value)-u}});return a}}function ou(e,t){return Kt?Kt:t?e.tickOffset()*2*Qt/t:0}function uu(){var e={},t=0,n,r;to(Zs(Cu)).forEach(function(s){for(n=0;n<k.length;n++){if(k[n].indexOf(s.id)<0){continue}for(r=0;r<k[n].length;r++){if(k[n][r]in e){e[s.id]=e[k[n][r]];break}}}if(i(e[s.id])){e[s.id]=t++}});e.__max__=t-1;return e}function au(e,t,n){var r=n?wr:gr;return function(n){var i=n.id in t?t[n.id]:0;return n.x||n.x===0?r(n.x)-0*(e/2-i):0}}function fu(e){return function(t){var n=e?Ti(t.id):xi(t.id);return n(t.value)}}function lu(e,t){var n=Ko(to(Zs(Cu))),r=n.map(function(e){return e.id});return function(i,s){var o=t?Ti(i.id):xi(i.id),u=o(0),a=u;n.forEach(function(t){if(t.id===i.id||e[t.id]!==e[i.id]){return}if(r.indexOf(t.id)<r.indexOf(i.id)&&t.values[s].value>0){a+=o(t.values[s].value)-u}});return a}}function cu(){var e={},t=0,n,r;to(Zs(xu)).forEach(function(s){for(n=0;n<k.length;n++){if(k[n].indexOf(s.id)<0){continue}for(r=0;r<k[n].length;r++){if(k[n][r]in e){e[s.id]=e[k[n][r]];break}}}if(i(e[s.id])){e[s.id]=t++}});e.__max__=t-1;return e}function hu(e,t,n){var r=n?wr:gr;return function(n){var i=n.id in t?t[n.id]:0;return n.x||n.x===0?r(n.x)-0*(e/2-i):0}}function pu(e){return function(t){var n=e?Ti(t.id):xi(t.id);return n(t.value)}}function du(e,t){var n=Ko(to(Zs(xu))),r=n.map(function(e){return e.id});return function(i,s){var o=t?Ti(i.id):xi(i.id),u=o(0),a=u;n.forEach(function(t){if(t.id===i.id||e[t.id]!==e[i.id]){return}if(r.indexOf(t.id)<r.indexOf(i.id)&&t.values[s].value>0){a+=o(t.values[s].value)-u}});return a}}function vu(e,t){var n=i(e)?Gs():e;if(typeof n==="string"){n=[n]}for(var r=0;r<n.length;r++){Oa[n[r]]=t===O[n[r]];O[n[r]]=t}}function mu(e,t){var n=false;e.forEach(function(e){if(O[e.id]===t){n=true}if(!(e.id in O)&&t==="line"){n=true}});return n}function gu(e){return mu(e,"bar")}function yu(e){return mu(e,"scatter")}function bu(e){return mu(e,"pie")}function wu(e){return mu(e,"gauge")}function Eu(e){return mu(e,"donut")}function Su(e){return bu(e)||Eu(e)||wu(e)}function xu(e){var t=typeof e==="string"?e:e.id;return!(t in O)||O[t]==="line"||O[t]==="spline"||O[t]==="area"||O[t]==="area-spline"}function Tu(e){var t=typeof e==="string"?e:e.id;return!(t in O)||O[t]==="step"||O[t]==="area-step"}function Nu(e){var t=typeof e==="string"?e:e.id;return O[t]==="spline"||O[t]==="area-spline"}function Cu(e){var t=typeof e==="string"?e:e.id;return O[t]==="area"}function ku(e){var t=typeof e==="string"?e:e.id;return O[t]==="bar"}function Lu(e){var t=typeof e==="string"?e:e.id;return O[t]==="scatter"}function Au(e){var t=typeof e==="string"?e:e.id;return O[t]==="pie"}function Ou(e){var t=typeof e==="string"?e:e.id;return O[t]==="gauge"}function Mu(e){var t=typeof e==="string"?e:e.id;return O[t]==="donut"}function _u(e){return Au(e)||Mu(e)||Ou(e)}function Du(e){return ku(e)?e.values:[]}function Pu(e){return xu(e)||Lu(e)?e.values:[]}function Hu(e){return ku(e)||xu(e)?e.values:[]}function Bu(e,t){var n=[],r=e,i=Uu(t)?t:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];return function(t){if(t in r){return e[t]}if(n.indexOf(t)===-1){n.push(t)}return i[n.indexOf(t)%i.length]}}function ju(e,t){var n=e,r=t;return function(e){for(var t=1;t<r.length;t++){if(r[0]==="percentage"&&e/on*100<r[t]){return n[t-1]}if(r[0]==="whole"&&e<r[t]){return n[t-1]}}return n[n.length-1]}}function Fu(t){var n;if(!t){throw Error(t+" can not be parsed as d3.time with format "+T+". Maybe 'x' of this data is not defined. See data.x or data.xs option.")}try{n=T?o.time.format(T).parse(t):new Date(t)}catch(r){n=undefined}if(!n){e.console.error("Failed to parse x '"+t+"' to Date with format "+T)}return n}function Iu(e,t){var n=o.mouse(e),r=o.select(e);var i=r.attr("cx")*1,s=r.attr("cy")*1;return Math.sqrt(Math.pow(i-n[0],2)+Math.pow(s-n[1],2))<t}function qu(e){var t=o.mouse(e),n=e.getBBox();var r=n.x,i=n.y,s=n.width,u=n.height,a=2;var f=r-a,l=r+s+a,c=i+u+a,h=i-a;return f<t[0]&&t[0]<l&&h<t[1]&&t[1]<c}function Ru(e,t){var n;for(n=0;n<t.length;n++){if(t[n].start<e&&e<=t[n].end){return true}}return false}function Uu(e){return Object.keys(e).length>0}function zu(e,t){var n=false;Object.keys(e).forEach(function(r){if(e[r]===t){n=true}});return n}function Wu(e,t){return Math.pow(gr(e.x)-t[0],2)+Math.pow(yr(e.value)-t[1],2)}function Xu(e,t){var n=0;e.each(function(){++n}).each("end",function(){if(!--n){t.apply(this,arguments)}})}function Vu(e,t,r){U(t,e.node());xa.select("."+n.selectedCircles+ko(t.id)).selectAll("."+n.selectedCircle+"-"+r).data([t]).enter().append("circle").attr("class",function(){return co(n.selectedCircle,r)}).attr("cx",st?tu:eu).attr("cy",st?eu:tu).attr("stroke",function(){return Rn(t.id)}).attr("r",Jt*1.4).transition().duration(100).attr("r",Jt)}function $u(e,t,r){z(t,e.node());xa.select("."+n.selectedCircles+ko(t.id)).selectAll("."+n.selectedCircle+"-"+r).transition().duration(100).attr("r",0).remove()}function Ju(e,t,n,r){e?Vu(t,n,r):$u(t,n,r)}function Ku(e,t){U(t,e.node());e.transition().duration(100).style("fill",function(){return o.rgb(Rn(t.id)).darker(1)})}function Qu(e,t){z(t,e.node());e.transition().duration(100).style("fill",function(){return Rn(t.id)})}function Gu(e,t,n,r){e?Ku(t,n,r):Qu(t,n,r)}function Yu(e){return e.filter(function(e){return r(e.value)})}function Zu(e,t){return(t?xa.selectAll("."+n.circles+ko(t)):xa).selectAll("."+n.circle+(r(e)?"-"+e:""))}function ea(e,t){Zu(e,t).classed(n.EXPANDED,true).attr("r",$t)}function ta(e){Zu(e).filter(function(){return o.select(this).classed(n.EXPANDED)}).classed(n.EXPANDED,false).attr("r",Wt)}function na(e){return xa.selectAll("."+n.bar+(r(e)?"-"+e:""))}function ra(e){na(e).classed(n.EXPANDED,true)}function ia(e){na(e).classed(n.EXPANDED,false)}function ua(e,t){var n,r=pa(e,t);if(st){n=o.svg.area().x0(function(e,t){return xi(e.id)(0)}).x1(function(e,t){return xi(e.id)(e.value)}).y(Fo)}else{n=o.svg.area().x(Fo).y0(function(e,t){if(k.length>0){var n=r(e,t);return n[0][1]}return xi(e.id)(0)}).y1(function(e,t){if(k.length>0){var n=r(e,t);return n[1][1]}return xi(e.id)(e.value)})}return function(e,t){var r=Yu(e.values),i,s;if(mu([e],"area")||mu([e],"area-spline")){Nu(e)?n.interpolate("cardinal"):n.interpolate("linear");return n(r)}else if(mu([e],"area-step")){Tu(e)?n.interpolate("step-after"):n.interpolate("linear");return n(r)}else{i=gr(r[0].x);s=xi(e.id)(r[0].value);return st?"M "+s+" "+i:"M "+i+" "+s}}}function aa(e,t){var n=da(e,t);return function(e,t){var r=n(e,t);var i=st?1:0;var s=st?0:1;var o="M "+r[0][i]+","+r[0][s]+" "+"L"+r[1][i]+","+r[1][s]+" "+"L"+r[2][i]+","+r[2][s]+" "+"L"+r[3][i]+","+r[3][s]+" "+"z";return o}}function fa(e,t){var n=va(e,t),r=o.svg.line().x(st?function(e,t){if(k.length>0){var r=n(e,t);return r[0][1]}return xi(e.id)(e.value)}:Fo).y(st?Fo:function(e,t){if(k.length>0){var r=n(e,t);return r[0][1]}return xi(e.id)(e.value)});return function(e){var t=Yu(e.values),n,i;if(xu(e)){Nu(e)?r.interpolate("cardinal"):r.interpolate("linear");return D[e.id]?ya(t,gr,xi(e.id),D[e.id]):r(t)}else if(Tu(e)){r.interpolate("step-after");return D[e.id]?ya(t,gr,xi(e.id),D[e.id]):r(t)}else{n=gr(t[0].x);i=xi(e.id)(t[0].value);return st?"M "+i+" "+n:"M "+n+" "+i}}}function la(e,t){var n=da(e,false),r=t?ca:ha;return function(e,t){return r(n(e,t),e,this)}}function ca(e,t){var n;if(st){n=ku(t)?4:6;return e[2][1]+n*(t.value<0?-1:1)}else{return e[0][0]+(e[2][0]-e[0][0])/2}}function ha(e,t,n){var r=n.getBBox();if(st){return(e[0][0]+e[2][0]+r.height*.6)/2}else{return e[2][1]+(t.value<0?r.height:ku(t)?-3:-6)}}function pa(e,t){var n=e.__max__+1,r=au(n,e,!!t),i=fu(!!t),s=lu(e,!!t),o=t?Ti:xi;return function(e,t){var n=o(e.id)(0),u=s(e,t)||n,a=r(e),f=i(e);if(st){if(e.value>0&&f<u||e.value<0&&f>u){f=u}}return[[a,u],[a,f-(n-u)]]}}function da(e,t){var n=e.__max__+1,r=ou(xr,n),i=ru(r,n,e,!!t),s=iu(!!t),o=su(e,!!t),u=t?Ti:xi;return function(e,t){var n=u(e.id)(0),a=o(e,t)||n,f=i(e),l=s(e);if(st){if(e.value>0&&l<a||e.value<0&&l>a){l=a}}return[[f,a],[f,l-(n-a)],[f+r,l-(n-a)],[f+r,a]]}}function va(e,t){var n=e.__max__+1,r=hu(n,e,!!t),i=pu(!!t),s=du(e,!!t),o=t?Ti:xi;return function(e,t){var n=o(e.id)(0),u=s(e,t)||n,a=r(e),f=i(e);if(st){if(e.value>0&&f<u||e.value<0&&f>u){f=u}}return[[a,f-(n-u)]]}}function ya(e,t,n,r){var o=-1,u,a;var f="M",l;var c,h,p,d,v,m;var g,y;var b=[];if(s(r)){for(u=0;u<r.length;u++){b[u]={};if(i(r[u].start)){b[u].start=e[0].x}else{b[u].start=Pn?Fu(r[u].start):r[u].start}if(i(r[u].end)){b[u].end=e[e.length-1].x}else{b[u].end=Pn?Fu(r[u].end):r[u].end}}}g=st?function(e){return n(e.value)}:function(e){return t(e.x)};y=st?function(e){return t(e.x)}:function(e){return n(e.value)};if(Pn){l=function(e,r,i,s){var o=e.x.getTime(),u=r.x-e.x,a=new Date(o+u*i),f=new Date(o+u*(i+s));return"M"+t(a)+" "+n(h(i))+" "+t(f)+" "+n(h(i+s))}}else{l=function(e,r,i,s){return"M"+t(c(i))+" "+n(h(i))+" "+t(c(i+s))+" "+n(h(i+s))}}for(u=0;u<e.length;u++){if(i(b)||!Ru(e[u].x,b)){f+=" "+g(e[u])+" "+y(e[u])}else{c=Ei(e[u-1].x,e[u].x);h=Si(e[u-1].value,e[u].value);p=t(e[u].x)-t(e[u-1].x);d=n(e[u].value)-n(e[u-1].value);v=Math.sqrt(Math.pow(p,2)+Math.pow(d,2));m=2/v;var w=m*2;for(a=m;a<=1;a+=w){f+=l(e[u-1],e[u],a,m)}}o=e[u].x}return f}function Ma(t){var r,i;var s;ka=o.select(c);if(ka.empty()){throw new Error('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".')}else{ka.html("")}ka.classed("c3",true);u.data.x={};u.data.targets=Xs(t);Wr();bi();gr.domain(o.extent(ks(u.data.targets)));yr.domain(Ss(u.data.targets,"y"));br.domain(Ss(u.data.targets,"y2"));wr.domain(gr.domain());Er.domain(yr.domain());Sr.domain(br.domain());La=gr.domain();ba.scale(wr);if(m){wa.scale(gr)}Ea=ka.append("svg").attr("width",Jn+Xn.left+Xn.right).attr("height",Qn+Xn.top+Xn.bottom).on("mouseenter",b).on("mouseleave",w);Sa=Ea.append("defs");Sa.append("clipPath").attr("id",Ln).append("rect").attr("width",Jn).attr("height",Qn);Sa.append("clipPath").attr("id",An).append("rect").attr("x",ri).attr("y",ii).attr("width",fi).attr("height",li);Sa.append("clipPath").attr("id",On).append("rect").attr("x",si).attr("y",oi).attr("width",ci).attr("height",hi);xa=Ea.append("g").attr("transform",Mr.main);Ta=Q?Ea.append("g").attr("transform",Mr.context):null;Na=tt?Ea.append("g").attr("transform",Mr.legend):null;Ca=o.select(c).style("position","relative").append("div").style("position","absolute").style("pointer-events","none").style("z-index","10").style("display","none");if(u.data.targets.length==0){xa.append("text").attr("class",n.text).attr("x",xa[0][0].parentNode.width.baseVal.value/2-Xn.left).attr("y",xa[0][0].parentNode.height.baseVal.value/2-Xn.top).attr("text-anchor","middle").attr("style",(K?"fill:"+K+"; ":"")+(J?"font-size:"+J+"; ":"")).text($)}xa.append("g").attr("class",n.axisX).attr("clip-path",st?"":_n).attr("transform",Mr.x).append("text").attr("class",n.axisXLabel).attr("transform",st?"rotate(-90)":"").attr("dx",Vi).attr("dy",Ki).style("text-anchor",Yi);if(yt){xa.append("g").attr("class",n.axisY).attr("clip-path",st?Dn:"").append("text").attr("class",n.axisYLabel).attr("transform",st?"":"rotate(-90)").attr("dx",$i).attr("dy",Qi).style("text-anchor",Zi)}if(kt){xa.append("g").attr("class",n.axisY2).attr("transform",Mr.y2).append("text").attr("class",n.axisY2Label).attr("transform",st?"":"rotate(-90)").attr("dx",Ji).style("text-anchor",es)}i=xa.append("g").attr("clip-path",Mn).attr("class",n.grid);if(jt){i.append("g").attr("class",n.xgrids)}if(Uu(It)){i.append("g").attr("class",n.xgridLines)}if(Xt){i.append("g").attr("class",n.xgridFocus).append("line").attr("class",n.xgridFocus).attr("x1",st?0:-10).attr("x2",st?Jn:-10).attr("y1",st?-10:Xn.top).attr("y2",st?-10:Qn)}if(qt){i.append("g").attr("class",n.ygrids)}if(Uu(Rt)){i.append("g").attr("class",n.ygridLines)}xa.append("g").attr("clip-path",Mn).attr("class",n.regions);xa.append("g").attr("clip-path",Mn).attr("class",n.chart);r=xa.select("."+n.chart).append("g").attr("class",n.eventRects).style("fill-opacity",0).style("cursor",m?st?"ns-resize":"ew-resize":null);xa.select("."+n.chart).append("g").attr("class",n.chartBars);xa.select("."+n.chart).append("g").attr("class",n.chartLines);xa.select("."+n.chart).append("g").attr("class",n.chartArcs).attr("transform",Mr.arc).append("text").attr("class",n.chartArcsTitle).style("text-anchor","middle").text(ms());xa.select("."+n.chart).append("g").attr("class",n.chartTexts);if(m){xa.insert("rect",y?null:"g."+n.grid).attr("class",n.zoomRect).attr("width",Jn).attr("height",Qn).style("opacity",0).style("cursor",st?"ns-resize":"ew-resize").call(wa).on("dblclick.zoom",null)}if(mt){ba.extent(typeof mt!=="function"?mt:mt(ks()))}if(Q){Ta.append("g").attr("clip-path",Mn).attr("class",n.chart);Ta.select("."+n.chart).append("g").attr("class",n.chartBars);Ta.select("."+n.chart).append("g").attr("class",n.chartLines);Ta.append("g").attr("clip-path",Mn).attr("class",n.brush).call(ba).selectAll("rect").attr(st?"width":"height",st?Kn:Gn);Ta.append("g").attr("class",n.axisX).attr("transform",Mr.subx).attr("clip-path",st?"":_n)}Wa(u.data.targets);if(st){xa.select("."+n.axisX).style("opacity",0).call(xr)}else{xa.select("."+n.axisY).style("opacity",0).call(Tr);xa.select("."+n.axisY2).style("opacity",0).call(Nr)}za({withTransform:true,withLegend:true,durationForAxis:0});if(Nn){if(Pn&&typeof Cn==="string"){Cn=Fu(Cn);for(s=0;s<u.data.targets[0].values.length;s++){if(u.data.targets[0].values[s].x-Cn===0){break}}Cn=s}Ca.html(Tn(u.data.targets.map(function(e){return Is(e.values[Cn])}),Li(),Ho,Rn));Ca.style("top",kn.top).style("left",kn.left).style("display","block")}if(e.onresize==null){e.onresize=Ra()}if(e.onresize.add){e.onresize.add(function(){za({withTransition:false,withLegend:true})})}}function _a(e){e.append("rect").attr("class",No).style("cursor",H&&B?"pointer":null).on("mouseover",function(e,t){if(Fn){return}if(Su(u.data.targets)){return}var r=u.data.targets.map(function(e){return Is(e.values[t])});var i,s;if(Object.keys(C).length>0){s=[];for(var o in C){for(i=0;i<r.length;i++){if(r[i].id===o){s.push(r[i]);r.shift(i);break}}}r=s.concat(r)}if(Vt){ea(t)}ra(t);xa.selectAll("."+n.shape+"-"+t).each(function(e){q(e)})}).on("mouseout",function(e,t){if(Su(u.data.targets)){return}Zo();Go();ta(t);ia();xa.selectAll("."+n.shape+"-"+t).each(function(e){R(e)})}).on("mousemove",function(e,t){var r;if(Fn){return}if(Su(u.data.targets)){return}r=to(u.data.targets).map(function(e){return Is(e.values[t])});Qo(r,o.mouse(this));Yo(r);if(!H){return}if(B){return}xa.selectAll("."+n.shape+"-"+t).filter(function(e){return j(e)}).each(function(){var e=o.select(this).classed(n.EXPANDED,true);if(this.nodeName==="circle"){e.attr("r",$t)}Ea.select("."+n.eventRect+"-"+t).style("cursor",null)}).filter(function(){if(this.nodeName==="circle"){return Iu(this,Jt)}else if(this.nodeName==="path"){return qu(this)}}).each(function(){var e=o.select(this);if(!e.classed(n.EXPANDED)){e.classed(n.EXPANDED,true);if(this.nodeName==="circle"){e.attr("r",Jt)}}Ea.select("."+n.eventRect+"-"+t).style("cursor","pointer")})}).on("click",function(e,t){if(Su(u.data.targets)){return}if(In){In=false;return}xa.selectAll("."+n.shape+"-"+t).each(function(e){Pa(this,e,t)})}).call(o.behavior.drag().origin(Object).on("drag",function(){Ha(o.mouse(this))}).on("dragstart",function(){Ba(o.mouse(this))}).on("dragend",function(){ja()})).call(wa).on("dblclick.zoom",null)}function Da(e){e.append("rect").attr("x",0).attr("y",0).attr("width",Jn).attr("height",Qn).attr("class",n.eventRect).on("mouseout",function(){if(Su(u.data.targets)){return}Zo();Go();ta()}).on("mousemove",function(){var e,t,r;if(Fn){return}if(Su(u.data.targets)){return}e=o.mouse(this);t=Wo(u.data.targets,e);r=[Is(t)];Qo(r,e);if(Vt){ta();ea(t.index,t.id)}Yo(r);if(Wu(t,e)<100){Ea.select("."+n.eventRect).style("cursor","pointer");if(!qn){q(t);qn=true}}else{Ea.select("."+n.eventRect).style("cursor",null);R(t);qn=false}}).on("click",function(){var e,t;if(Su(u.data.targets)){return}e=o.mouse(this);t=Wo(u.data.targets,e);if(Wu(t,e)<100){xa.select("."+n.circles+"-"+ko(t.id)).select("."+n.circle+"-"+t.index).each(function(){Pa(this,t,t.index)})}}).call(o.behavior.drag().origin(Object).on("drag",function(){Ha(o.mouse(this))}).on("dragstart",function(){Ba(o.mouse(this))}).on("dragend",function(){ja()})).call(wa).on("dblclick.zoom",null)}function Pa(e,t,r){var i=o.select(e),s=i.classed(n.SELECTED);var u=false,a;if(e.nodeName==="circle"){u=Iu(e,Jt*1.5);a=Ju}else if(e.nodeName==="path"){u=qu(e);a=Gu}if(B||u){if(H&&j(t)){if(!F){xa.selectAll("."+n.shapes+(B?ko(t.id):"")).selectAll("."+n.shape).each(function(e,t){var r=o.select(this);if(r.classed(n.SELECTED)){a(false,r.classed(n.SELECTED,false),e,t)}})}i.classed(n.SELECTED,!s);a(!s,i,t,r)}I(t,e)}}function Ha(e){var t,r,i,s,a,f,l,c;if(Su(u.data.targets)){return}if(!H){return}if(m&&!wa.altDomain){return}if(!F){return}t=jn[0];r=jn[1];i=e[0];s=e[1];a=Math.min(t,i);f=Math.max(t,i);l=B?Xn.top:Math.min(r,s);c=B?Qn:Math.max(r,s);xa.select("."+n.dragarea).attr("x",a).attr("y",l).attr("width",f-a).attr("height",c-l);xa.selectAll("."+n.shapes).selectAll("."+n.shape).filter(function(e){return j(e)}).each(function(e,t){var r=o.select(this),i=r.classed(n.SELECTED),s=r.classed(n.INCLUDED),u,h,p,d,v,m=false,g;if(this.nodeName==="circle"){u=r.attr("cx")*1;h=r.attr("cy")*1;v=Ju;m=a<u&&u<f&&l<h&&h<c}else if(this.nodeName==="path"){g=Vo(this);u=g.x;h=g.y;p=g.width;d=g.height;v=Gu;m=!(f<u||u+p<a)&&!(c<h||h+d<l)}if(m^s){r.classed(n.INCLUDED,!s);r.classed(n.SELECTED,!i);v(!i,r,e,t)}})}function Ba(e){if(Su(u.data.targets)){return}if(!H){return}jn=e;xa.select("."+n.chart).append("rect").attr("class",n.dragarea).style("opacity",.1);Fn=true;W()}function ja(){if(Su(u.data.targets)){return}if(!H){return}xa.select("."+n.dragarea).transition().duration(100).style("opacity",0).remove();xa.selectAll("."+n.shape).classed(n.INCLUDED,false);Fn=false;X()}function Fa(e){var t,i,a,f,l,c,h;var p,d,v,g,y,b;var w=uu(),S=nu(),T=cu(),N;var C,k;var L,A,O,M,_,D,P;var H=Su(u.data.targets);var B,j,F,I,q,R;var U,z,W;var X=to(u.data.targets),$,J,K;if(X.length===0&&V){return}e=s(e)?e:{};L=s(e.withY)?e.withY:true;A=s(e.withSubchart)?e.withSubchart:true;O=s(e.withTransition)?e.withTransition:true;M=s(e.withTransform)?e.withTransform:false;_=s(e.withUpdateXDomain)?e.withUpdateXDomain:false;D=s(e.withUpdateOrgXDomain)?e.withUpdateOrgXDomain:false;P=s(e.withLegend)?e.withLegend:false;U=O?E:0;z=s(e.durationForExit)?e.durationForExit:U;W=s(e.durationForAxis)?e.durationForAxis:U;if(P&&tt){Ya(u.data.targets,e)}if(D){gr.domain(o.extent(ks(X)));La=gr.domain();if(m){wa.scale(gr).updateScaleExtent()}wr.domain(gr.domain());ba.scale(wr)}if(_){gr.domain(ba.empty()?La:ba.extent());if(m){wa.scale(gr).updateScaleExtent()}if(!yu(X)){$=ro(no(X));xr.tickValues($);Cr.tickValues($)}}yr.domain(Ss(X,"y"));br.domain(Ss(X,"y2"));xa.select("."+n.axisX).style("opacity",H?0:1).transition().duration(W).call(xr);xa.select("."+n.axisY).style("opacity",H?0:1).transition().duration(W).call(Tr);xa.select("."+n.axisY2).style("opacity",H?0:1).transition().duration(W).call(Nr);if(_&<&&$){for(J=1;J<$.length;J++){if($.length/J<ct){K=J;break}}o.selectAll("."+n.axisX+" .tick text").each(function(e,t){o.select(this).style("display",t%K?"none":"block")})}B=ua(w);j=aa(S);I=fa(T);q=la(S,true);R=la(S,false);ns();Er.domain(yr.domain());Sr.domain(br.domain());Ca.style("display","none");xa.select("line."+n.xgridFocus).style("visibility","hidden");if(jt){if(Ft==="year"){i=[];var G=ks();var Y=G[0].getFullYear();var nt=G[1].getFullYear();for(var rt=Y;rt<=nt;rt++){i.push(new Date(rt+"-01-01 00:00:00"))}}else{i=gr.ticks(10)}t=xa.select("."+n.xgrids).selectAll("."+n.xgrid).data(i);t.enter().append("line").attr("class",n.xgrid);t.attr("x1",st?0:function(e){return gr(e)-xr.tickOffset()}).attr("x2",st?Jn:function(e){return gr(e)-xr.tickOffset()}).attr("y1",st?function(e){return gr(e)-xr.tickOffset()}:Xn.top).attr("y2",st?function(e){return gr(e)-xr.tickOffset()}:Qn).style("opacity",function(){return+o.select(this).attr(st?"y1":"x1")===(st?Qn:0)?0:1});t.exit().remove()}if(Uu(It)){a=xa.select("."+n.xgridLines).selectAll("."+n.xgridLine).data(It);f=a.enter().append("g").attr("class",function(e){return n.xgridLine+(e.class?e.class:"")});f.append("line").style("opacity",0);f.append("text").attr("text-anchor","end").attr("transform",st?"":"rotate(-90)").attr("dx",st?0:-Xn.top).attr("dy",-5).style("opacity",0);a.select("line").transition().duration(U).attr("x1",st?0:Io).attr("x2",st?Jn:Io).attr("y1",st?Io:Xn.top).attr("y2",st?Io:Qn).style("opacity",1);a.select("text").transition().duration(U).attr("x",st?Jn:0).attr("y",Io).text(function(e){return e.text}).style("opacity",1);a.exit().transition().duration(U).style("opacity",0).remove()}if(L&&qt){l=xa.select("."+n.ygrids).selectAll("."+n.ygrid).data(yr.ticks(Ut));l.enter().append("line").attr("class",n.ygrid);l.attr("x1",st?yr:0).attr("x2",st?yr:Jn).attr("y1",st?0:yr).attr("y2",st?Qn:yr);l.exit().remove()}if(L&&Uu(Rt)){c=xa.select("."+n.ygridLines).selectAll("."+n.ygridLine).data(Rt);h=c.enter().append("g").attr("class",function(e){return n.ygridLine+(e.class?e.class:"")});h.append("line").style("opacity",0);h.append("text").attr("text-anchor","end").attr("transform",st?"rotate(-90)":"").attr("dx",st?0:-Xn.top).attr("dy",-5).style("opacity",0);c.select("line").transition().duration(U).attr("x1",st?qo:0).attr("x2",st?qo:Jn).attr("y1",st?0:qo).attr("y2",st?Qn:qo).style("opacity",1);c.select("text").transition().duration(U).attr("x",st?0:Jn).attr("y",qo).text(function(e){return e.text}).style("opacity",1);c.exit().transition().duration(U).style("opacity",0).remove()}d=xa.selectAll("."+n.bars).selectAll("."+n.bar).data(Du);d.enter().append("path").attr("d",j).style("stroke",function(e){return Rn(e.id)}).style("stroke-width",2).style("opacity",0).style("fill",function(e){return Rn(e.id)}).style("fill-opacity",function(){if(Z){return Z}return Ao}).attr("class",wo);d.style("opacity",Ao).transition().duration(U).attr("d",j).style("opacity",1);d.exit().transition().duration(z).style("opacity",0).remove();g=xa.selectAll("."+n.texts).selectAll("."+n.text).data(Hu);g.enter().append("text").attr("class",ho).attr("text-anchor",function(e){return st?e.value<0?"end":"start":"middle"}).style("stroke","none").style("fill-opacity",0);g.text(function(e){return jo(e.id)(e.value)}).style("fill-opacity",Oo).transition().duration(U).attr("x",q).attr("y",R).style("fill-opacity",_o);g.exit().transition().duration(z).style("fill-opacity",0).remove();xa.selectAll("."+n.line).style("opacity",Ao).transition().duration(U).attr("d",I).style("opacity",1);xa.selectAll("."+n.step).style("opacity",Ao).transition().duration(U).attr("d",I).style("opacity",1);xa.selectAll("."+n.area).style("opacity",0).transition().duration(U).attr("d",B).style("opacity",Aa);p=xa.selectAll("."+n.circles).selectAll("."+n.circle).data(Pu);p.enter().append("circle").attr("class",yo).style("opacity",0).attr("r",Wt);p.style("opacity",Ao).transition().duration(U).style("opacity",Mo).attr("cx",st?tu:eu).attr("cy",st?eu:tu);p.exit().remove();xa.selectAll("."+n.chartArc).select("."+n.arc).attr("transform",M?"scale(0)":"").style("opacity",function(e){return e===this._current?0:1}).transition().duration(U).attrTween("d",function(e){var t=is(e),n;if(!t){return function(){return"M 0 0"}}if(isNaN(this._current.endAngle))this._current.endAngle=this._current.startAngle;n=o.interpolate(this._current,t);this._current=n(0);return function(e){return us(n(e),true)}}).attr("transform",M?"scale(1)":"").style("fill",function(e){return cn==="arc"&&et?Un(e.data.values[0].value):Rn(e.data.id)}).style("opacity",Z?Z:1);xa.selectAll("."+n.chartArc).select("text").attr("transform",as).style("opacity",0).transition().duration(U).text(cs).style("opacity",function(e){return eo(e.data.id)&&_u(e.data)?1:0});if(cn==="arc"){xa.selectAll("."+n.chartArc).select("text.units").attr("transform",as).style("opacity",0).transition().duration(U).text(rn?hn:"").style("opacity",function(e){return eo(e.data.id)&&_u(e.data)?1:0});xa.selectAll("."+n.chartArc).select("text.min").attr("transform",as).style("opacity",0).transition().duration(U).text(rn?un:"").style("opacity",function(e){return eo(e.data.id)&&_u(e.data)?1:0});xa.selectAll("."+n.chartArc).select("text.max").attr("transform",as).style("opacity",0).transition().duration(U).text(rn?on:"").style("opacity",function(e){return eo(e.data.id)&&_u(e.data)?1:0})}xa.select("."+n.chartArcsTitle).style("opacity",Eu(u.data.targets)||wu(u.data.targets)?1:0);if(Q){if(o.event!==null&&o.event.type==="zoom"){ba.extent(gr.orgDomain()).update()}if(A){Ta.select("."+n.axisX).style("opacity",H?0:1).transition().duration(U).call(Cr);if(!ba.empty()){ba.extent(gr.orgDomain()).update()}F=aa(S,true);y=Ta.selectAll("."+n.bars).selectAll("."+n.bar).data(Du);y.enter().append("path").attr("d",F).style("stroke","none").style("fill",function(e){return Rn(e.id)}).attr("class",wo);y.style("opacity",Ao).transition().duration(U).attr("d",F).style("opacity",1);y.exit().transition().duration(U).style("opacity",0).remove();Ta.selectAll("."+n.line).style("opacity",Ao).transition().duration(U).attr("d",ma).style("opacity",1);Ta.selectAll("."+n.step).style("opacity",Ao).transition().duration(U).attr("d",ma).style("opacity",1);Ta.selectAll("."+n.area).style("opacity",Ao).transition().duration(U).attr("d",ga).style("opacity",Aa)}}xa.selectAll("."+n.selectedCircles).filter(function(e){return ku(e)}).selectAll("circle").remove();xa.selectAll("."+n.selectedCircle).transition().duration(U).attr("cx",st?tu:eu).attr("cy",st?eu:tu);if(Uu(x)){b=xa.select("."+n.eventRects).selectAll("."+n.eventRect).data([0]);Da(b.enter());b.attr("x",0).attr("y",0).attr("width",Jn).attr("height",Qn)}else{if(Bn&&!Hn){k=function(e,t){var n=$s(t),r=Js(t),i=u.data.x[e.id][t];return(gr(r?r:i+50)-gr(n?n:i-50))/2};C=function(e,t){var n=$s(t),r=u.data.x[e.id][t];return(gr(r)+gr(n?n:r-50))/2}}else{k=pi();C=function(e){return gr(e.x)-k/2}}N=Qs();xa.select("."+n.eventRects).datum(N?N.values:[]);b=xa.select("."+n.eventRects).selectAll("."+n.eventRect).data(function(e){return e});_a(b.enter());b.attr("class",No).attr("x",st?0:C).attr("y",st?C:0).attr("width",st?Jn:k).attr("height",st?k:Qn);b.exit().remove()}v=xa.select("."+n.regions).selectAll("rect."+n.region).data(wn);v.enter().append("rect").style("fill-opacity",0);v.attr("class",To).attr("x",st?0:_s).attr("y",st?_s:Xn.top).attr("width",st?Jn:Ds).attr("height",st?Ds:Qn).transition().duration(U).style("fill-opacity",function(e){return r(e.opacity)?e.opacity:.1});v.exit().transition().duration(U).style("fill-opacity",0).remove();Gs().forEach(function(e){Oa[e]=true})}function Ia(){Fa({withTransition:false,withY:false,withSubchart:false,withUpdateXDomain:true})}function qa(){if(o.event.sourceEvent.type==="mousemove"&&wa.altDomain){gr.domain(wa.altDomain);wa.scale(gr).updateScaleExtent();return}if(Hn&&gr.orgDomain()[0]===La[0]){gr.domain([La[0]-1e-10,gr.orgDomain()[1]])}Fa({withTransition:false,withY:false,withSubchart:false});if(o.event.sourceEvent.type==="mousemove"){In=true}}function Ra(){function t(){e.forEach(function(e){e()})}var e=[];t.add=function(t){e.push(t)};return t}function Ua(){Ea.attr("width",Yn).attr("height",Zn);Ea.select("#"+Ln).select("rect").attr("width",Jn).attr("height",Qn);Ea.select("#"+An).select("rect").attr("width",fi);Ea.select("#"+On).select("rect").attr("width",ci);Ea.select("."+n.zoomRect).attr("width",Jn).attr("height",Qn)}function za(e){e=s(e)?e:{};e.withTransition=s(e.withTransition)?e.withTransition:true;e.withTransform=s(e.withTransform)?e.withTransform:false;e.withLegend=s(e.withLegend)?e.withLegend:false;e.withUpdateXDomain=true;e.withUpdateOrgXDomain=true;e.durationForExit=0;Wr();bi();Ua();qr(e.withTransition);Fa(e)}function Wa(e){var t,r,i,s,u,a,f,l;var c,h,p,d;f=xa.select("."+n.chartTexts).selectAll("."+n.chartText).data(e);l=f.enter().append("g").attr("class",function(e){return n.chartText+co(n.target,e.id)}).style("pointer-events","none");l.append("g").attr("class",po).style("fill",function(e){return Rn(e.id)});s=xa.select("."+n.chartBars).selectAll("."+n.chartBar).data(e);i=s.enter().append("g").attr("class",function(e){return n.chartBar+co(n.target,e.id)}).style("pointer-events","none");i.append("g").attr("class",Eo).style("fill",function(e){return Rn(e.id)}).style("stroke","none").style("cursor",function(e){return j(e)?"pointer":null});r=xa.select("."+n.chartLines).selectAll("."+n.chartLine).data(e);t=r.enter().append("g").attr("class",function(e){return n.chartLine+co(n.target,e.id)}).style("pointer-events","none");t.append("path").attr("class",go).style("opacity",0).style("stroke",function(e){return Rn(e.id)});t.append("path").attr("class",Co).style("opacity",0).style("stroke",function(e){return Rn(e.id)});t.append("path").attr("class",xo).style("opacity",function(){Aa=Z?Z:1;return Aa}).style("fill",function(e){return Rn(e.id)});t.append("g").attr("class",function(e){return co(n.selectedCircles,e.id)});t.append("g").attr("class",bo).style("fill",function(e){return Rn(e.id)}).style("cursor",function(e){return j(e)?"pointer":null});e.forEach(function(e){xa.selectAll("."+n.selectedCircles+ko(e.id)).selectAll("."+n.selectedCircle).each(function(t,n){t.value=e.values[n].value})});a=xa.select("."+n.chartArcs).selectAll("."+n.chartArc).data(ar(e));u=a.enter().append("g").attr("class",function(e){return n.chartArc+co(n.target,e.data.id)});if(cn==="arc"){u.append("path").attr("class","").style("opacity",1).style("fill",nn).style("cursor","pointer").attr("transform","scale(1,1)").attr("d",function(e){e.value=on;e.startAngle=-1*(Math.PI/2);e.endAngle=Math.PI/2;return us(e,true)})}u.append("path").attr("class",So).style("opacity",0).style("fill",function(e){return cn==="arc"&&et?Un(e.data.values[0].value):Rn(e.data.id)}).style("cursor",function(e){return j(e)?"pointer":null}).each(function(e){this._current=e}).on("mouseover",function(e,t){var n=is(e),r=ls(n),i=ys();hs(n.data.id);Ka(n.data.id);i(r,t)}).on("mousemove",function(e){var t=is(e),n=[ls(t)];Qo(n,o.mouse(this))}).on("mouseout",function(e,t){var n=is(e),r=ls(n),i=bs();ps(n.data.id);Ga();Go();i(r,t)}).on("click",function(e,t){var n=is(e),r=ls(n),i=gs();i(r,t)});u.append("text").attr("dy",cn==="arc"?"-0.35em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none").style("font-size",Jn/10+"px");if(cn==="arc"){u.select("text").style("fill","#000");u.append("text").attr("dy",".75em").attr("class","units").style("opacity",0).style("text-anchor","middle").style("pointer-events","none").style("fill","#000").style("font-size",Jn/15+"px");u.append("text").attr("dx",-1*(ir+(nr-ir)/2)+"px").attr("dy","1em").attr("class","min").style("opacity",0).style("text-anchor","middle").style("pointer-events","none").style("fill","#777").style("font-size",Jn/20+"px");u.append("text").attr("dx",ir+(nr-ir)/2+"px").attr("dy","1em").attr("class","max").style("opacity",0).style("text-anchor","middle").style("pointer-events","none").style("fill","#777").style("font-size",Jn/20+"px")}if(Q){d=Ta.select("."+n.chartBars).selectAll("."+n.chartBar).data(e);p=d.enter().append("g").attr("class",function(e){return n.chartBar+co(n.target,e.id)});p.append("g").attr("class",Eo).style("fill",function(e){return Rn(e.id)});h=Ta.select("."+n.chartLines).selectAll("."+n.chartLine).data(e);c=h.enter().append("g").attr("class",function(e){return n.chartLine+co(n.target,e.id)});c.append("path").attr("class",go).style("opacity",0).style("stroke",function(e){return Rn(e.id)});c.append("path").attr("class",Co).style("opacity",0).style("stroke",function(e){return Rn(e.id)});c.append("path").attr("class",xo).style("opacity",Aa).style("fill",function(e){return Rn(e.id)})}Ea.selectAll("."+n.target).filter(function(e){return eo(e.id)}).transition().style("opacity",1)}function Xa(e,t){u.data.targets.forEach(function(t){for(var n=0;n<e.length;n++){if(t.id===e[n].id){t.values=e[n].values;e.splice(n,1);break}}});u.data.targets=u.data.targets.concat(e);Wa(u.data.targets);Fa({withUpdateOrgXDomain:true,withUpdateXDomain:true,withLegend:true});if(typeof t==="function"){t()}}function Va(e){if("data"in e){Xa(Xs(e.data),e.done)}else if("url"in e){o.csv(e.url,function(t,n){Xa(Xs(n),e.done)})}else if("rows"in e){Xa(Xs(zs(e.rows)),e.done)}else if("columns"in e){Xa(Xs(Ws(e.columns)),e.done)}else{throw Error("url or rows or columns is required.")}}function $a(e,t){if(typeof t!=="function"){t=function(){}}e=e.filter(function(e){return Ys(e)});if(!e||e.length===0){t();return}Ea.selectAll(e.map(function(e){return Lo(e)})).transition().style("opacity",0).remove().call(Xu,t);e.forEach(function(e){Oa[e]=false;if(tt){Na.selectAll("."+n.legendItem+ko(e)).remove()}u.data.targets=u.data.targets.filter(function(t){return t.id!==e})})}function Ja(e,t){var r,i,s;if(!tt){return}r=Na.selectAll("."+n.legendItem);i=function(t){return!e||t===e};s=function(e){return!i(e)};r.filter(s).transition().duration(100).style("opacity",t?.3:1);r.filter(i).transition().duration(100).style("opacity",t?1:.3)}function Ka(e){Ja(e,true)}function Qa(e){Ja(e,false)}function Ga(){if(!tt){return}Na.selectAll("."+n.legendItem).transition().duration(100).style("opacity",1)}function Ya(e,t){function L(e,t,n){function c(e,t){if(!t){f=(a-b-u)/2;if(f<y){f=(a-u)/2;b=0;N++}}T[e]=N;x[N]=f;w[e]=b;b+=u}var i=e.getBBox(),s=Math.ceil((i.width+v)/10)*10,o=Math.ceil((i.height+d)/10)*10,u=_r?o:s,a=_r?er:tr,f,l;if(n){b=0;N=0;m=0;g=0}E[t]=s;S[t]=o;if(!m||s>=m){m=s}if(!g||o>=g){g=o}l=_r?g:m;if(it){Object.keys(E).forEach(function(e){E[e]=m});Object.keys(S).forEach(function(e){S[e]=g});f=(a-l*r.length)/2;if(f<y){b=0;N=0;r.forEach(function(e){c(e)})}else{c(t,true)}}else{c(t)}}var r=Gs(e),o;var a,f,l,c,h,p;var d=4,v=26,m=0,g=0,y=10;var b=0,w={},E={},S={},x={},T={},N=0;var k;t=i(t)?{}:t;k=s(t.withTransition)?t.withTransition:true;if(_r){a=function(e){return m*(.2+T[e])};c=function(e){return x[T[e]]+w[e]}}else{a=function(e){return x[T[e]]+w[e]};c=function(e){return g*(.2+T[e])}}f=function(e,t){return a(e,t)+14};h=function(e,t){return c(e,t)+9};l=function(e,t){return a(e,t)-4};p=function(e,t){return c(e,t)-7};o=Na.selectAll("."+n.legendItem).data(r).enter().append("g").attr("class",function(e){return co(n.legendItem,e)}).style("cursor","pointer").on("click",function(e){typeof rt==="function"?rt(e):u.toggle(e)}).on("mouseover",function(e){u.focus(e)}).on("mouseout",function(){u.revert()});o.append("text").text(function(e){return s(C[e])?C[e]:e}).each(function(e,t){L(this,e,t===0)}).style("pointer-events","none").attr("x",_r?f:-200).attr("y",_r?-200:h);o.append("rect").attr("class",n.legendItemEvent).style("fill-opacity",0).attr("x",_r?l:-200).attr("y",_r?-200:p).attr("width",function(e){return E[e]}).attr("height",function(e){return S[e]});o.append("rect").attr("class",n.legendItemTile).style("pointer-events","none").style("fill",function(e){return Rn(e)}).attr("x",_r?f:-200).attr("y",_r?-200:c).attr("width",10).attr("height",10);Na.selectAll("text").data(r).text(function(e){return s(C[e])?C[e]:e}).each(function(e,t){L(this,e,t===0)}).transition().duration(k?250:0).attr("x",f).attr("y",h);Na.selectAll("rect."+n.legendItemEvent).data(r).transition().duration(k?250:0).attr("x",l).attr("y",p);Na.selectAll("rect."+n.legendItemTile).data(r).transition().duration(k?250:0).attr("x",a).attr("y",c);vi(m);mi(g);di(N);Wr();bi();Ua();qr(false)}function Za(e){return Ys(e.id)}function ef(e){return"data"in e&&Ys(e.data.id)}function tf(e){var t=e&&e.value?e.value:null,n=e&&e["class"]?e["class"]:null;return t?function(e){return e.value!==t}:n?function(e){return e["class"]!==n}:function(){return true}}var o=e.d3?e.d3:e.require?e.require("d3"):undefined;var u={data:{},axis:{}},a={};var c=l(["bindto"],"#chart");var h=l(["size","width"]),p=l(["size","height"]);var d=l(["padding","left"]),v=l(["padding","right"]);var m=l(["zoom","enabled"],false),g=l(["zoom","extent"]),y=l(["zoom","privileged"],false);var b=l(["onenter"],function(){}),w=l(["onleave"],function(){});var E=l(["transition","duration"],350);f("data","data is required in config");var S=l(["data","x"]),x=l(["data","xs"],{}),T=l(["data","x_format"]),N=l(["data","id_converter"],function(e){return e}),C=l(["data","names"],{}),k=l(["data","groups"],[]),L=l(["data","axes"],{}),A=l(["data","type"]),O=l(["data","types"],{}),M=l(["data","labels"],{}),_=l(["data","order"]),D=l(["data","regions"],{}),P=l(["data","colors"],{}),H=l(["data","selection","enabled"],false),B=l(["data","selection","grouped"],false),j=l(["data","selection","isselectable"],function(){return true}),F=l(["data","selection","multiple"],true),I=l(["data","onclick"],function(){}),q=l(["data","onenter"],function(){}),R=l(["data","onleave"],function(){}),U=l(["data","onselected"],function(){}),z=l(["data","onunselected"],function(){}),W=l(["data","ondragstart"],function(){}),X=l(["data","ondragend"],function(){});var V=l(["data","empty","abort"],true),$=l(["data","empty","label","text"],""),J=l(["data","empty","label","size"],false),K=l(["data","empty","label","fill"],false);var Q=l(["subchart","show"],false),G=Q?l(["subchart","size","height"],60):0;var Y=l(["color","pattern"],[]),Z=l(["color","opacity"],null),et=l(["color","values"],[]);var tt=l(["legend","show"],true),nt=l(["legend","position"],"bottom"),rt=l(["legend","item","onclick"]),it=l(["legend","equally"],false);var st=l(["axis","rotated"],false),ot=l(["axis","x","type"],"indexed"),ut=l(["axis","x","categories"],[]),at=l(["axis","x","tick","centered"],false),ft=l(["axis","x","tick","format"]),lt=l(["axis","x","tick","culling"],{}),ct=l(["axis","x","tick","culling","max"],ot==="categorized"?Infinity:10),ht=l(["axis","x","tick","count"]),pt=l(["axis","x","tick","fit"],false),dt=l(["axis","x","max"]),vt=l(["axis","x","min"]),mt=l(["axis","x","default"]),gt=l(["axis","x","label"],{}),yt=l(["axis","y","show"],true),bt=l(["axis","y","max"]),wt=l(["axis","y","min"]),Et=l(["axis","y","center"]),St=l(["axis","y","label"],{}),xt=l(["axis","y","inner"],false),Tt=l(["axis","y","tick","format"]),Nt=l(["axis","y","padding"]),Ct=l(["axis","y","ticks"],10),kt=l(["axis","y2","show"],false),Lt=l(["axis","y2","max"]),At=l(["axis","y2","min"]),Ot=l(["axis","y2","center"]),Mt=l(["axis","y2","label"],{}),_t=l(["axis","y2","inner"],false),Dt=l(["axis","y2","tick","format"]),Pt=l(["axis","y2","padding"]),Ht=l(["axis","y2","ticks"],10);var Bt=l(["zeropadding"],false);var jt=l(["grid","x","show"],false),Ft=l(["grid","x","type"],"tick"),It=l(["grid","x","lines"],[]),qt=l(["grid","y","show"],false),Rt=l(["grid","y","lines"],[]),Ut=l(["grid","y","ticks"],10);var zt=l(["point","show"],true),Wt=zt?l(["point","r"],2.5):0,Xt=l(["point","focus","line","enabled"],true),Vt=l(["point","focus","expand","enabled"],true),$t=l(["point","focus","expand","r"],Vt?4:Wt),Jt=l(["point","focus","select","r"],8);var Kt=l(["bar","width"]),Qt=l(["bar","width","ratio"],.6);var Gt=l(["pie","label","show"],true),Yt=l(["pie","label","format"]),Zt=l(["pie","onclick"],function(){}),en=l(["pie","onmouseover"],function(){}),tn=l(["pie","onmouseout"],function(){});var nn=l(["gauge","color"],"#e0e0e0"),rn=l(["gauge","label","show"],true),sn=l(["gauge","label","format"]),on=l(["gauge","max"]),un=l(["gauge","min"]),an=l(["gauge","onclick"],function(){}),fn=l(["gauge","onmouseover"],function(){}),ln=l(["gauge","onmouseout"],function(){}),cn=l(["gauge","style"]),hn=l(["gauge","units"]),pn=l(["gauge","width"],false);var dn=l(["donut","label","show"],true),vn=l(["donut","label","format"]),mn=l(["donut","title"],""),gn=l(["donut","onclick"],function(){}),yn=l(["donut","onmouseover"],function(){}),bn=l(["donut","onmouseout"],function(){});var wn=l(["regions"],[]);var En=l(["tooltip","show"],true),Sn=l(["tooltip","format","title"]),xn=l(["tooltip","format","value"]),Tn=l(["tooltip","contents"],function(e,t,r,i){var s=Sn?Sn:t,o=xn?xn:r,u,a,f,l,c,h;for(a=0;a<e.length;a++){if(!(e[a]&&(e[a].value||e[a].value===0))){continue}if(!u){f=s?s(e[a].x):e[a].x;u="<table class='"+n.tooltip+"'>"+(f||f===0?"<tr><th colspan='2'>"+f+"</th></tr>":"")}c=e[a].name;l=o(e[a].value,e[a].ratio);h=cn==="arc"&&et?Un(e[a].value):i(e[a].id);u+="<tr class='"+n.tooltipName+"-"+e[a].id+"'>";u+="<td class='name'><span style='background-color:"+h+"'></span>"+c+"</td>";u+="<td class='value'>"+l+"</td>";u+="</tr>"}return u+"</table>"}),Nn=l(["tooltip","init","show"],false),Cn=l(["tooltip","init","x"],0),kn=l(["tooltip","init","position"],{top:"0px",left:"50px"});var Ln=(typeof c==="string"?c.replace("#",""):c.id)+"-clip",An=Ln+"-xaxis",On=Ln+"-yaxis",Mn=Br(Ln),_n=Br(_n),Dn=Br(Dn);var Pn=ot==="timeseries",Hn=ot==="categorized",Bn=!Pn&&(S||Uu(x));var jn=null,Fn=false,In=false,qn=false;var Rn=Bu(P,Y);var Un=ju(Y,et);var zn=function(){var e=[[o.time.format("%Y/%-m/%-d"),function(){return true}],[o.time.format("%-m/%-d"),function(e){return e.getMonth()}],[o.time.format("%-m/%-d"),function(e){return e.getDate()!==1}],[o.time.format("%-m/%-d"),function(e){return e.getDay()&&e.getDate()!==1}],[o.time.format("%I %p"),function(e){return e.getHours()}],[o.time.format("%I:%M"),function(e){return e.getMinutes()}],[o.time.format(":%S"),function(e){return e.getSeconds()}],[o.time.format(".%L"),function(e){return e.getMilliseconds()}]];return function(t){var n=e.length-1,r=e[n];while(!r[1](t)){r=e[--n]}return r[0](t)}}();var Wn=[];var Xn,Vn,$n,Jn,Kn,Qn,Gn,Yn,Zn,er,tr;var nr,rr,ir,sr,or,ur,ar;var fr,lr,cr,hr,pr,dr,vr,mr;var gr,yr,br,wr,Er,Sr,xr,Tr,Nr,Cr;var kr=st?"left":"bottom",Lr=st?xt?"top":"bottom":xt?"right":"left",Ar=st?_t?"bottom":"top":_t?"left":"right",Or=st?"left":"bottom";var Mr={main:function(){return"translate("+Xn.left+","+Xn.top+")"},context:function(){return"translate("+Vn.left+","+Vn.top+")"},legend:function(){return"translate("+$n.left+","+$n.top+")"},x:function(){return"translate(0,"+(st?0:Qn)+")"},y:function(){return"translate(0,"+(st?Qn:0)+")"},y2:function(){return"translate("+(st?0:Jn)+","+(st?1:0)+")"},subx:function(){return"translate(0,"+(st?0:Gn)+")"},arc:function(){return"translate("+Jn/2+","+Qn/2+")"}};var _r=nt==="right";var Dr=0,Pr=0,Hr=0;var Rr=30,Ur=30,zr=5;ar=o.layout.pie().value(function(e){return e.values.reduce(function(e,t){return e+t.value},0)});var sa=function(){var e=o.svg.line().x(st?function(e){return xi(e.id)(e.value)}:Fo).y(st?Fo:function(e){return xi(e.id)(e.value)});return function(t){var n=Yu(t.values),r,i;if(xu(t)){Nu(t)?e.interpolate("cardinal"):e.interpolate("linear");return D[t.id]?ya(n,gr,xi(t.id),D[t.id]):e(n)}else if(Tu(t)){e.interpolate("step-after");return D[t.id]?ya(n,gr,xi(t.id),D[t.id]):e(n)}else{r=gr(n[0].x);i=xi(t.id)(n[0].value);return st?"M "+i+" "+r:"M "+r+" "+i}}}();var oa=function(){var e;if(st){e=o.svg.area().x0(function(e){return xi(e.id)(0)}).x1(function(e){return xi(e.id)(e.value)}).y(Fo)}else{e=o.svg.area().x(Fo).y0(function(e){return xi(e.id)(0)}).y1(function(e){return xi(e.id)(e.value)})}return function(t){var n=Yu(t.values),r,i;if(mu([t],"area")||mu([t],"area-spline")){Nu(t)?e.interpolate("cardinal"):e.interpolate("linear");return e(n)}else if(mu([t],"area-step")){Tu(t)?e.interpolate("step-after"):e.interpolate("linear");return e(n)}else{r=gr(n[0].x);i=xi(t.id)(n[0].value);return st?"M "+i+" "+r:"M "+r+" "+i}}}();var ma=function(){var e=o.svg.line().x(st?function(e){return Ti(e.id)(e.value)}:Ro).y(st?Ro:function(e){return Ti(e.id)(e.value)});return function(t){var n=Yu(t.values);if(xu(t)){return e(n)}else if(Tu(t)){e.interpolate("step-after");return e(n)}else{return"M "+wr(n[0].x)+" "+Ti(t.id)(n[0].value)}}}();var ga=function(){var e=o.svg.area().x(Fo).y0(function(e){return Ti(e.id)(Xn.bottom-G)}).y1(function(e){return Ti(e.id)(e.value)});return function(t){var n=Yu(t.values),r,i;if(mu([t],"area")||mu([t],"area-spline")){Nu(t)?e.interpolate("cardinal"):e.interpolate("linear");return e(n)}else if(mu([t],"area-step")){Tu(t)?e.interpolate("step-after"):e.interpolate("linear");return e(n)}else{r=wr(n[0].x);i=Ti(t.id)(n[0].value);return st?"M "+i+" "+r:"M "+r+" "+i}}}();var ba,wa=function(){};ba=o.svg.brush().on("brush",Ia);ba.update=function(){if(Ta){Ta.select("."+n.brush).call(this)}return this};ba.scale=function(e){return st?this.y(e):this.x(e)};if(m){wa=o.behavior.zoom().on("zoomstart",function(){wa.altDomain=o.event.sourceEvent.altKey?gr.orgDomain():null}).on("zoom",m?qa:null);wa.scale=function(e){return st?this.y(e):this.x(e)};wa.orgScaleExtent=function(){var e=g?g:[1,10];return[e[0],Math.max(Ks()/e[1],e[1])]};wa.updateScaleExtent=function(){var e=Ls(gr.orgDomain())/Ls(La),t=this.orgScaleExtent();this.scaleExtent([t[0]*e,t[1]*e]);return this}}var Ea,Sa,xa,Ta,Na,Ca,ka;var La;var Aa,Oa={};u.focus=function(e){function s(e){to(e).transition().duration(100).style("opacity",1)}var t=Ea.selectAll(Lo(e)),r=t.filter(Za),i=t.filter(ef);u.revert();u.defocus();s(r.classed(n.focused,true));s(i);if(Su(u.data.targets)){hs(e,true)}Ka(e)};u.defocus=function(e){function s(e){to(e).transition().duration(100).style("opacity",.3)}var t=Ea.selectAll(Lo(e)),r=t.filter(Za),i=t.filter(ef);u.revert();s(r.classed(n.focused,false));s(i);if(Su(u.data.targets)){ps(e)}Qa(e)};u.revert=function(e){function s(e){to(e).transition().duration(100).style("opacity",1)}var t=Ea.selectAll(Lo(e)),r=t.filter(Za),i=t.filter(ef);s(r.classed(n.focused,false));s(i);if(Su(u.data.targets)){ps(e)}Ga()};u.show=function(e){so(e);Ea.selectAll(Lo(e)).transition().style("opacity",1);Fa({withUpdateOrgXDomain:true,withUpdateXDomain:true,withLegend:false})};u.hide=function(e){io(e);Ea.selectAll(Lo(e)).transition().style("opacity",0);Fa({withUpdateOrgXDomain:true,withUpdateXDomain:true,withLegend:false})};u.toggle=function(e){eo(e)?u.hide(e):u.show(e)};u.unzoom=function(){ba.clear().update();Fa({withUpdateXDomain:true})};u.load=function(e){if(e.xs){Fs(e.xs)}if("categories"in e&&Hn){ut=e.categories;xr.categories(ut)}if("cacheIds"in e&&As(e.cacheIds)){Xa(Ms(e.cacheIds),e.done);return}if("unload"in e){$a(typeof e.unload==="string"?[e.unload]:typeof e.unload==="boolean"&&e.unload?Gs():e.unload,function(){Va(e)})}else{Va(e)}};u.unload=function(e){$a(e?typeof e==="string"?[e]:e:Gs(),function(){Fa({withUpdateOrgXDomain:true,withUpdateXDomain:true,withLegend:true})})};u.selected=function(e){return o.merge(xa.selectAll("."+n.shapes+ko(e)).selectAll("."+n.shape).filter(function(){return o.select(this).classed(n.SELECTED)}).map(function(e){return e.map(function(e){return e.__data__})}))};u.select=function(e,t,r){if(!H){return}xa.selectAll("."+n.shapes).selectAll("."+n.shape).each(function(i,u){var a=o.select(this),f=this.nodeName==="circle"?Vu:Ku,l=this.nodeName==="circle"?$u:Qu,c=B||!e||e.indexOf(i.id)>=0,h=!t||t.indexOf(u)>=0,p=a.classed(n.SELECTED);if(c&&h){if(j(i)&&!p){f(a.classed(n.SELECTED,true),i,u)}}else if(s(r)&&r){if(p){l(a.classed(n.SELECTED,false),i,u)}}})};u.unselect=function(e,t){if(!H){return}xa.selectAll("."+n.shapes).selectAll("."+n.shape).each(function(r,i){var s=o.select(this),u=this.nodeName==="circle"?$u:Qu,a=B||!e||e.indexOf(r.id)>=0,f=!t||t.indexOf(i)>=0,l=s.classed(n.SELECTED);if(a&&f){if(j(r)){if(l){u(s.classed(n.SELECTED,false),r,i)}}}})};u.toLine=function(e){vu(e,"line");za()};u.toSpline=function(e){vu(e,"spline");za()};u.toBar=function(e){vu(e,"bar");za()};u.toScatter=function(e){vu(e,"scatter");za()};u.toArea=function(e){vu(e,"area");za()};u.toAreaSpline=function(e){vu(e,"area-spline");za()};u.toPie=function(e){vu(e,"pie");za({withTransform:true})};u.toDonut=function(e){vu(e,"donut");za({withTransform:true})};u.groups=function(e){if(i(e)){return k}k=e;Fa();return k};u.xgrids=function(e){if(!e){return It}It=e;Fa();return It};u.xgrids.add=function(e){if(!e){return}return u.xgrids(It.concat(e))};u.xgrids.remove=function(e){var t=tf(e);return u.xgrids(It.filter(t))};u.ygrids=function(e){if(!e){return Rt}Rt=e;Fa();return Rt};u.ygrids.add=function(e){if(!e){return}return u.ygrids(Rt.concat(e))};u.ygrids.remove=function(e){var t=tf(e);return u.ygrids(Rt.filter(t))};u.regions=function(e){if(i(e)){return wn}wn=e;Fa();return wn};u.regions.add=function(e){if(i(e)){return wn}wn=wn.concat(e);Fa();return wn};u.regions.remove=function(e,t){var n=[].concat(e);t=s(t)?t:{};n.forEach(function(e){var n=r(t.duration)?t.duration:0;Ea.selectAll("."+e).transition().duration(n).style("fill-opacity",0).remove();wn=wn.filter(function(t){return t.classes.indexOf(e)<0})});return wn};u.data.get=function(e){var t=u.data.getAsTarget(e);return s(t)?t.values.map(function(e){return e.value}):undefined};u.data.getAsTarget=function(e){var t=Zs(function(t){return t.id===e});return t.length>0?t[0]:undefined};u.data.names=function(e){if(!arguments.length){return C}Object.keys(e).forEach(function(t){C[t]=e[t]});Ya(u.data.targets,{withTransition:true});return C};u.x=function(e){if(arguments.length){qs(u.data.targets,e);Fa({withUpdateOrgXDomain:true,withUpdateXDomain:true})}return u.data.x};u.xs=function(e){if(arguments.length){Rs(u.data.targets,e);Fa({withUpdateOrgXDomain:true,withUpdateXDomain:true})}return u.data.x};u.axis.labels=function(e){if(arguments.length){Object.keys(e).forEach(function(t){Mi(t,e[t])});ns()}};u.axis.max=function(e){if(arguments.length){if(typeof e==="object"){if(r(e.y)){bt=+e.y}if(r(e.y2)){Lt=+e.y2}}else{bt=Lt=+e}Fa()}};u.axis.min=function(e){if(arguments.length){if(typeof e==="object"){if(r(e.y)){wt=+e.y}if(r(e.y2)){At=+e.y2}}else{wt=At=+e}Fa()}};u.axis.range=function(e){if(arguments.length){if(typeof e.max!=="undefined"){u.axis.max(e.max)}if(typeof e.min!=="undefined"){u.axis.min(e.min)}}};u.resize=function(e){h=e?e.width:null;p=e?e.height:null;za({withLegend:true,withTransition:false})};u.destroy=function(){u.data.targets=undefined;u.data.x={};ka.html("");e.onresize=null};if("url"in t.data){o.csv(t.data.url,function(e,t){Ma(t)})}else if("rows"in t.data){Ma(zs(t.data.rows))}else if("columns"in t.data){Ma(Ws(t.data.columns))}else{throw Error("url or rows or columns is required.")}return u};if(typeof e.define==="function"&&e.define.amd){e.define("c3",["d3"],t)}else{e.c3=t}})(window)
|
|
|