().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),O.attr("x",o.left+k/2).attr("y",o.top+L/2).text(function(e){returne}),T}N.selectAll(".nv-noData").remove(),g=t.xScale(),y=t.yScale();varM=N.selectAll("g.nv-wrap.nv-lineChart").data([m]),_=M.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),D=M.select("g");_.append("rect").attr("width",k).attr("height",L).style("opacity",0),_.append("g").attr("class","nv-x nv-axis"),_.append("g").attr("class","nv-y nv-axis"),_.append("g").attr("class","nv-linesWrap"),_.append("g").attr("class","nv-legendWrap"),_.append("g").attr("class","nv-interactive"),l&&(i.width(k),D.select(".nv-legendWrap").datum(m).call(i),o.top!=i.height()&&(o.top=i.height(),L=(f||parseInt(N.style("height"))||400)-o.top-o.bottom),M.select(".nv-legendWrap").attr("transform","translate(0,"+-o.top+")")),M.attr("transform","translate("+o.left+","+o.top+")"),p&&D.select(".nv-y.nv-axis").attr("transform","translate("+k+",0)"),d&&(s.width(k).height(L).margin({left:o.left,top:o.top}).svgContainer(N).xScale(g),M.select(".nv-interactive").call(s)),t.width(k).height(L).color(m.map(function(e,t){returne.color||u(e,t)}).filter(function(e,t){return!m[t].disabled}));varP=D.select(".nv-linesWrap").datum(m.filter(function(e){return!e.disabled}));d3.transition(P).call(t),c&&(n.scale(g).ticks(k/100).tickSize(-L,0),D.select(".nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")"),d3.transition(D.select(".nv-x.nv-axis")).call(n)),h&&(r.scale(y).ticks(L/36).tickSize(-k,0),d3.transition(D.select(".nv-y.nv-axis")).call(r)),i.dispatch.on("legendClick",function(e,t){e.disabled=!e.disabled,m.filter(function(e){return!e.disabled}).length||m.map(function(e){returne.disabled=!1,M.selectAll(".nv-series").classed("disabled",!1),e}),b.disabled=m.map(function(e){return!!e.disabled}),S.stateChange(b),T.update()}),i.dispatch.on("legendDblclick",function(e){m.forEach(function(e){e.disabled=!0}),e.disabled=!1,b.disabled=m.map(function(e){return!!e.disabled}),S.stateChange(b),T.update()}),s.dispatch.on("elementMousemove",function(i){t.clearHighlights();vara,f,l,c=[];m.filter(function(e,t){returne.seriesIndex=t,!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,T.x()),t.highlightPoint(r,f,!0);vars=n.values[f];if(typeofs=="undefined")return;typeofa=="undefined"&&(a=s),typeofl=="undefined"&&(l=T.xScale()(T.x()(s,f))),c.push({key:n.key,value:T.y()(s,f),color:u(n,n.seriesIndex)})});varh=n.tickFormat()(T.x()(a,f));s.tooltip.position({left:l+o.left,top:i.mouseY+o.top}).chartContainer(C.parentNode).enabled(v).valueFormatter(function(e,t){returnr.tickFormat()(e)}).data({value:h,series:c})(),s.renderGuideLine(l)}),s.dispatch.on("elementMouseout",function(e){S.tooltipHide(),t.clearHighlights()}),S.on("tooltipShow",function(e){v&&x(e,C.parentNode)}),S.on("changeState",function(e){typeofe.disabled!="undefined"&&(m.forEach(function(t,n){t.disabled=e.disabled[n]}),b.disabled=e.disabled),T.update()})}),T}vart=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.interactiveGuideline(),o={top:30,right:20,bottom:50,left:60},u=e.utils.defaultColor(),a=null,f=null,l=!0,c=!0,h=!0,p=!1,d=!1,v=!0,m=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");n.orient("bottom").tickPadding(7),r.orient(p?"right":"left");varx=function(i,s){varo=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=m(i.series.key,a,f,i,T);e.tooltip.show([o,u],l,null,null,s)};returnt.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top],S.tooltipShow(e)}),t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)}),S.on("tooltipHide",function(){v&&e.tooltip.cleanup()}),T.dispatch=S,T.lines=t,T.legend=i,T.xAxis=n,T.yAxis=r,T.interactiveLayer=s,d3.rebind(T,t,"defined","isArea","x","y","size","xSc
l},S.color=function(t){returnarguments.length?(h=e.utils.getColor(t),S):h},S.barColor=function(t){returnarguments.length?(d=e.utils.getColor(t),S):d},S.disabled=function(e){returnarguments.length?(v=e,S):v},S.id=function(e){returnarguments.length?(o=e,S):o},S.hideable=function(e){returnarguments.length?(p=e,S):p},S.delay=function(e){returnarguments.length?(m=e,S):m},S},e.models.multiBarChart=function(){functionL(e){returne.each(function(e){varb=d3.select(this),A=this,O=(u||parseInt(b.style("width"))||960)-o.left-o.right,M=(a||parseInt(b.style("height"))||400)-o.top-o.bottom;L.update=function(){b.transition().call(L)},L.container=this,S.disabled=e.map(function(e){return!!e.disabled});if(!x){var_;x={};for(_inS)S[_]instanceofArray?x[_]=S[_].slice(0):x[_]=S[_]}if(!e||!e.length||!e.filter(function(e){returne.values.length}).length){varD=b.selectAll(".nv-noData").data([T]);returnD.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),D.attr("x",o.left+O/2).attr("y",o.top+M/2).text(function(e){returne}),L}b.selectAll(".nv-noData").remove(),w=t.xScale(),E=t.yScale();varP=b.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([e]),H=P.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),B=P.select("g");H.append("g").attr("class","nv-x nv-axis"),H.append("g").attr("class","nv-y nv-axis"),H.append("g").attr("class","nv-barsWrap"),H.append("g").attr("class","nv-legendWrap"),H.append("g").attr("class","nv-controlsWrap"),c&&(i.width(O-C()),t.barColor()&&e.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()}),B.select(".nv-legendWrap").datum(e).call(i),o.top!=i.height()&&(o.top=i.height(),M=(a||parseInt(b.style("height"))||400)-o.top-o.bottom),B.select(".nv-legendWrap").attr("transform","translate("+C()+","+-o.top+")"));if(l){varj=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(C()).color(["#444","#444","#444"]),B.select(".nv-controlsWrap").datum(j).attr("transform","translate(0,"+-o.top+")").call(s)}P.attr("transform","translate("+o.left+","+o.top+")"),d&&B.select(".nv-y.nv-axis").attr("transform","translate("+O+",0)"),t.disabled(e.map(function(e){returne.disabled})).width(O).height(M).color(e.map(function(e,t){returne.color||f(e,t)}).filter(function(t,n){return!e[n].disabled}));varF=B.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));d3.transition(F).call(t);if(h){n.scale(w).ticks(O/100).tickSize(-M,0),B.select(".nv-x.nv-axis").attr("transform","translate(0,"+E.range()[0]+")"),d3.transition(B.select(".nv-x.nv-axis")).call(n);varI=B.select(".nv-x.nv-axis > g").selectAll("g");I.selectAll("line, text").style("opacity",1);if(m){varq=function(e,t){return"translate("+e+","+t+")"},R=5,U=17;I.selectAll("text").attr("transform",function(e,t,n){returnq(0,n%2==0?R:U)});varz=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;B.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(e,t){returnq(0,t===0||z%2!==0?U:R)})}v&&I.filter(function(t,n){returnn%Math.ceil(e[0].values.length/(O/100))!==0}).selectAll("text, line").style("opacity",0),g&&I.selectAll("text").attr("transform","rotate("+g+" 0,0)").attr("text-anchor",g>0?"start":"end"),B.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}p&&(r.scale(E).ticks(M/36).tickSize(-O,0),d3.transition(B.select(".nv-y.nv-axis")).call(r)),i.dispatch.on("legendClick",function(t,n){t.disabled=!t.disabled,e.filter(function(e){return!e.disabled}).length||e.map(function(e){returne.disabled=!1,P.selectAll(".nv-series").classed("disabled",!1),e}),S.disabled=e.map(function(e){return!!e.disabled}),N.stateChange(S),L.update()}),i.dispatch.on("legendDblclick",function(t){e.forEach(function(e){e.disabled=!0}),t.disabled=!1,S.disabled=e.map(function(e){return!!e.disabled}),N.stateChange(S),L.update()}),s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;j=j.map(function(e){returne.disabled=!0,e}),e.disabled=!1;switch(e.key){case"Grouped":t.stacked(!1);break;case"Stacked":t.stack
:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u}),d3.event.stopPropagation()}).on("dblclick",function(e,t){b.elementDblClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u}),d3.event.stopPropagation()});A.attr("fill",function(e,t){returna(e,t)}).attr("stroke",function(e,t){returna(e,t)});varM=O.append("path").each(function(e){this._current=e});d3.transition(A.select("path")).attr("d",k).attrTween("d",P);if(l){var_=d3.svg.arc().innerRadius(0);c&&(_=k),h&&(_=d3.svg.arc().outerRadius(k.outerRadius())),O.append("g").classed("nv-label",!0).each(function(e,t){varn=d3.select(this);n.attr("transform",function(e){if(v){e.outerRadius=E+10,e.innerRadius=E+15;vart=(e.startAngle+e.endAngle)/2*(180/Math.PI);return(e.startAngle+e.endAngle)/2<Math.PI?t-=90:t+=90,"translate("+_.centroid(e)+") rotate("+t+")"}returne.outerRadius=w+10,e.innerRadius=w+15,"translate("+_.centroid(e)+")"}),n.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),n.append("text").style("text-anchor",v?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")}),A.select(".nv-label").transition().attr("transform",function(e){if(v){e.outerRadius=E+10,e.innerRadius=E+15;vart=(e.startAngle+e.endAngle)/2*(180/Math.PI);return(e.startAngle+e.endAngle)/2<Math.PI?t-=90:t+=90,"translate("+_.centroid(e)+") rotate("+t+")"}returne.outerRadius=w+10,e.innerRadius=w+15,"translate("+_.centroid(e)+")"}),A.each(function(e,t){varn=d3.select(this);n.select(".nv-label text").style("text-anchor",v?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").text(function(e,t){varn=(e.endAngle-e.startAngle)/(2*Math.PI);returne.value&&n>p?i(e.data):""});varr=n.select("text").node().getBBox();n.select(".nv-label rect").attr("width",r.width+10).attr("height",r.height+10).attr("transform",function(){return"translate("+[r.x-5,r.y-5]+")"})})}}),w}vart={top:0,right:0,bottom:0,left:0},n=500,r=500,i=function(e){returne.x},s=function(e){returne.y},o=function(e){returne.description},u=Math.floor(Math.random()*1e4),a=e.utils.defaultColor(),f=d3.format(",.2f"),l=!0,c=!0,h=!1,p=.02,d=!1,v=!1,m=!1,g=!1,y=.5,b=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");returnw.dispatch=b,w.margin=function(e){returnarguments.length?(t.top=typeofe.top!="undefined"?e.top:t.top,t.right=typeofe.right!="undefined"?e.right:t.right,t.bottom=typeofe.bottom!="undefined"?e.bottom:t.bottom,t.left=typeofe.left!="undefined"?e.left:t.left,w):t},w.width=function(e){returnarguments.length?(n=e,w):n},w.height=function(e){returnarguments.length?(r=e,w):r},w.values=function(t){returne.log("pie.values() is no longer supported."),w},w.x=function(e){returnarguments.length?(i=e,w):i},w.y=function(e){returnarguments.length?(s=d3.functor(e),w):s},w.description=function(e){returnarguments.length?(o=e,w):o},w.showLabels=function(e){returnarguments.length?(l=e,w):l},w.labelSunbeamLayout=function(e){returnarguments.length?(v=e,w):v},w.donutLabelsOutside=function(e){returnarguments.length?(h=e,w):h},w.pieLabelsOutside=function(e){returnarguments.length?(c=e,w):c},w.donut=function(e){returnarguments.length?(d=e,w):d},w.donutRatio=function(e){returnarguments.length?(y=e,w):y},w.startAngle=function(e){returnarguments.length?(m=e,w):m},w.endAngle=function(e){returnarguments.length?(g=e,w):g},w.id=function(e){returnarguments.length?(u=e,w):u},w.color=function(t){returnarguments.length?(a=e.utils.getColor(t),w):a},w.valueFormat=function(e){returnarguments.length?(f=e,w):f},w.labelThreshold=function(e){returnarguments.length?(p=e,w):p},w},e.models.pieChart=function(){functionv(e){returne.each(function(e){varu=d3.select(this),a=this,f=(i||parseInt(u.style("width"))||960)-r.left-r.right,d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom;v.update=function(){u.transition().call(v)},v.container=this,l.disabled=e.map(function(e){return!!e.disabled});if(!c){varm;c={};for(minl)l[m]instanceofArray?c[m]=l[m].slice(0):c[m]=l[m]}if(!e||!e.length){varg=u.selectAll(".nv-n