text: nv.models.multiBarHorizontalChart=function(){"use strict";function t(h){return h.each(function(m){var S=d3.select(this),A=this,D=(c||parseInt(S.style("width"))||960)-s.left-s.right,H=(d||parseInt(S.style("height"))||400)-s.top-s.bottom;if(t.update=function(){S.transition().duration(w).call(t)},t.container=this,v.disabled=m.map(function(t){return!!t.disabled}),!b){var W;b={};for(W in v)b[W]=v[W]instanceof Array?v[W].slice(0):v[W]}if(!(m&&m.length&&m.filter(function(t){return t.values.length}).length)){var z=S.selectAll(".nv-noData").data([k]);return z.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),z.attr("x",s.left+D/2).attr("y",s.top+H/2).text(function(t){return t}),t}S.selectAll(".nv-noData").remove(),e=a.xScale(),n=a.yScale();var F=S.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([m]),I=F.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),B=F.select("g");if(I.append("g").attr("class","nv-x nv-axis"),I.append("g").attr("class","nv-y nv-axis"),I.append("g").attr("class","nv-barsWrap"),I.append("g").attr("class","nv-legendWrap"),I.append("g").attr("class","nv-controlsWrap"),f&&(i.width(D-x()),a.barColor()&&m.forEach(function(t,e){t.color=d3.rgb("#ccc").darker(1.5*e).toString()}),B.select(".nv-legendWrap").datum(m).call(i),s.top!=i.height()&&(s.top=i.height(),H=(d||parseInt(S.style("height"))||400)-s.top-s.bottom),B.select(".nv-legendWrap").attr("transform","translate("+x()+","+-s.top+")")),p){var M=[{key:"Grouped",disabled:a.stacked()},{key:"Stacked",disabled:!a.stacked()}];l.width(x()).color(["#444","#444","#444"]),B.select(".nv-controlsWrap").datum(M).attr("transform","translate(0,"+-s.top+")").call(l)}F.attr("transform","translate("+s.left+","+s.top+")"),a.disabled(m.map(function(t){return t.disabled})).width(D).height(H).color(m.map(function(t,e){return t.color||u(t,e)}).filter(function(t,e){return!m[e].disabled}));var E=B.select(".nv-barsWrap").datum(m.filter(function(t){return!t.disabled}));E.transition().call(a),o.scale(e).ticks(H/24).tickSize(-D,0),B.select(".nv-x.nv-axis").transition().call(o);var G=B.select(".nv-x.nv-axis").selectAll("g");G.selectAll("line, text").style("opacity",1),r.scale(n).ticks(D/100).tickSize(-H,0),B.select(".nv-y.nv-axis").attr("transform","translate(0,"+H+")"),B.select(".nv-y.nv-axis").transition().call(r),i.dispatch.on("stateChange",function(e){v=e,y.stateChange(v),t.update()}),l.dispatch.on("legendClick",function(e){if(e.disabled){switch(M=M.map(function(t){return t.disabled=!0,t}),e.disabled=!1,e.key){case"Grouped":a.stacked(!1);break;case"Stacked":a.stacked(!0)}v.stacked=a.stacked(),y.stateChange(v),t.update()}}),y.on("tooltipShow",function(t){g&&C(t,A.parentNode)}),y.on("changeState",function(e){"undefined"!=typeof e.disabled&&(m.forEach(function(t,n){t.disabled=e.disabled[n]}),v.disabled=e.disabled),"undefined"!=typeof e.stacked&&(a.stacked(e.stacked),v.stacked=e.stacked),h.call(t)})}),t}var e,n,a=nv.models.multiBarHorizontal(),o=nv.models.axis(),r=nv.models.axis(),i=nv.models.legend().height(30),l=nv.models.legend().height(30),s={top:30,right:20,bottom:50,left:60},c=null,d=null,u=nv.utils.defaultColor(),p=!0,f=!0,h=!1,g=!0,m=function(t,e,n){return"<h3>"+t+" - "+e+"</h3>"+"<p>"+n+"</p>"},v={stacked:h},b=null,k="No Data Available.",y=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=function(){return p?180:0},w=250;a.stacked(h),o.orient("left").tickPadding(5).highlightZero(!1).showMaxMin(!1).tickFormat(function(t){return t}),r.orient("bottom").tickFormat(d3.format(",.1f")),l.updateState(!1);var C=function(e,n){var i=e.pos[0]+(n.offsetLeft||0),l=e.pos[1]+(n.offsetTop||0),s=o.tickFormat()(a.x()(e.point,e.pointIndex)),c=r.tickFormat()(a.y()(e.point,e.pointIndex)),d=m(e.series.key,s,c,e,t);nv.tooltip.show([i,l],d,e.value<0?"e":"w",null,n)};return a.dispatch.on("elementMouseover.tooltip",function(t){t.pos=[t.pos[0]+s.left,t.pos[1]+s.top],y.tooltipShow(t)}),a.dispatch.on("elementMouseout.tooltip",function(t){y.tooltipHide(t)}),y.on("tooltipHide",function(){g&&nv.tooltip.cleanup()}),t.dispatch=y,t.multibar=a,t.legend=i,t.xAxis=o,t.yAxis=r,d3.rebind(t,a,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","delay","showValues","valueFormat","stacked","barColor"),t.options=nv.utils.optionsFunc.bind(t),t.margin=function(e){return arguments.length?(s.top="undefined"!=typeof e.top?e.top:s.top,s.right="undefined"!=typeof e.right?e.right:s.right,s.bottom="undefined"!=typeof e.bottom?e.bottom:s.bottom,s.left="undefined"!=typeof e.left?e.left:s.left,t):s},t.width=function(e){return arguments.length?(c=e,t):c},t.height=function(e){return arguments.length?(d=e,t):d},t.color=function(e){return arguments.length?(u=nv.utils.getColor(e),i.color(u),t):u},t.showControls=function(e){return arguments.length?(p=e,t):p},t.showLegend=function(e){return arguments.length?(f=e,t):f},t.tooltip=function(e){return arguments.length?(m=e,t):m},t.tooltips=function(e){return arguments.length?(g=e,t):g},t.tooltipContent=function(e){return arguments.length?(m=e,t):m},t.state=function(e){return arguments.length?(v=e,t):v},t.defaultState=function(e){return arguments.length?(b=e,t):b},t.noData=function(e){return arguments.length?(k=e,t):k},t.transitionDuration=function(e){return arguments.length?(w=e,t):w},t};