You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nvd3/nv.d3.min.js

5 lines
141 KiB
JavaScript

(function(){function b(a,b){return(new Date(b,a+1,0)).getDate()}function c(a,b,c){return function(d,e,f){var g=a(d),h=[];g<d&&b(g);if(f>1)while(g<e){var i=new Date(+g);c(i)%f===0&&h.push(i),b(g)}else while(g<e)h.push(new Date(+g)),b(g);return h}}var a=window.nv||{};a.version="0.0.1a",a.dev=!0,window.nv=a,a.tooltip={},a.utils={},a.models={},a.charts={},a.graphs=[],a.logs={},a.dispatch=d3.dispatch("render_start","render_end"),a.dev&&(a.dispatch.on("render_start",function(b){a.logs.startTime=+(new Date)}),a.dispatch.on("render_end",function(b){a.logs.endTime=+(new Date),a.logs.totalTime=a.logs.endTime-a.logs.startTime,a.log("total",a.logs.totalTime)})),a.log=function(){if(a.dev&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(a.dev&&console.log&&Function.prototype.bind){var b=Function.prototype.bind.call(console.log,console);b.apply(console,arguments)}return arguments[arguments.length-1]},a.render=function d(b){b=b||1,d.active=!0,a.dispatch.render_start(),setTimeout(function(){var c;for(var e=0;e<b&&(graph=d.queue[e]);e++)c=graph.generate(),typeof graph.callback==typeof Function&&graph.callback(c),a.graphs.push(c);d.queue.splice(0,e),d.queue.length?setTimeout(arguments.callee,0):(a.render.active=!1,a.dispatch.render_end())},0)},a.render.active=!1,a.render.queue=[],a.addGraph=function(b){typeof arguments[0]==typeof Function&&(b={generate:arguments[0],callback:arguments[1]}),a.render.queue.push(b),a.render.active||a.render()},a.identity=function(a){return a},a.strip=function(a){return a.replace(/(\s|&)/g,"")},d3.time.monthEnd=function(a){return new Date(a.getFullYear(),a.getMonth(),0)},d3.time.monthEnds=c(d3.time.monthEnd,function(a){a.setUTCDate(a.getUTCDate()+1),a.setDate(b(a.getMonth()+1,a.getFullYear()))},function(a){return a.getMonth()}),function(){var b=window.nv.tooltip={};b.show=function(b,c,d,e,f,g){var h=document.createElement("div");h.className="nvtooltip "+(g?g:"xy-tooltip"),d=d||"s",e=e||20;var i=f?f:document.getElementsByTagName("body")[0];h.innerHTML=c,h.style.left=0,h.style.top=0,h.style.opacity=0,i.appendChild(h);var j=parseInt(h.offsetHeight),k=parseInt(h.offsetWidth),l=a.utils.windowSize().width,m=a.utils.windowSize().height,n=window.scrollY,o=window.scrollX,p,q;m=window.innerWidth>=document.body.scrollWidth?m:m-16,l=window.innerHeight>=document.body.scrollHeight?l:l-16;var r=function(a){var b=q;do isNaN(a.offsetTop)||(b+=a.offsetTop);while(a=a.offsetParent);return b},s=function(a){var b=p;do isNaN(a.offsetLeft)||(b+=a.offsetLeft);while(a=a.offsetParent);return b};switch(d){case"e":p=b[0]-k-e,q=b[1]-j/2;var t=s(h),u=r(h);t<o&&(p=b[0]+e>o?b[0]+e:o-t+p),u<n&&(q=n-u+q),u+j>n+m&&(q=n+m-u+q-j);break;case"w":p=b[0]+e,q=b[1]-j/2,t+k>l&&(p=b[0]-k-e),u<n&&(q=n+5),u+j>n+m&&(q=n-j-5);break;case"n":p=b[0]-k/2-5,q=b[1]+e;var t=s(h),u=r(h);t<o&&(p=o+5),t+k>l&&(p=p-k/2+5),u+j>n+m&&(q=n+m-u+q-j);break;case"s":p=b[0]-k/2,q=b[1]-j-e;var t=s(h),u=r(h);t<o&&(p=o+5),t+k>l&&(p=p-k/2+5),n>u&&(q=n)}return h.style.left=p+"px",h.style.top=q+"px",h.style.opacity=1,h.style.position="absolute",h.style.pointerEvents="none",h},b.cleanup=function(){var a=document.getElementsByClassName("nvtooltip"),b=[];while(a.length)b.push(a[0]),a[0].style.transitionDelay="0 !important",a[0].style.opacity=0,a[0].className="nvtooltip-pending-removal";setTimeout(function(){while(b.length){var a=b.pop();a.parentNode.removeChild(a)}},500)}}(),a.utils.windowSize=function(){var a={width:640,height:480};return document.body&&document.body.offsetWidth&&(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight),document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth&&(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight),window.innerWidth&&window.innerHeight&&(a.width=window.innerWidth,a.height=window.innerHeight),a},a.utils.windowResize=function(a){var b=window.onresize;window.onresize=function(c){typeof b=="function"&&b(c),a(c)}},a.utils.getColor=function(b){return arguments.length?Object.prototype.toString.call(b)==="[object Array]"?funct
a){return arguments.length?(m=a,t):m},t.rectClass=function(a){return arguments.length?(q=a,t):q},t},a.models.discreteBarChart=function(){function q(a){return a.each(function(h){var k=d3.select(this),r=this,s=(f||parseInt(k.style("width"))||960)-e.left-e.right,t=(g||parseInt(k.style("height"))||400)-e.top-e.bottom;q.update=function(){a.transition().call(q)},q.container=this;if(!h||!h.length||!h.filter(function(a){return a.values.length}).length){var u=k.selectAll(".nv-noData").data([n]);return u.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),u.attr("x",e.left+s/2).attr("y",e.top+t/2).text(function(a){return a}),q}k.selectAll(".nv-noData").remove(),l=b.xScale(),m=b.yScale();var v=k.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([h]),w=v.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),z=w.append("defs"),A=v.select("g");w.append("g").attr("class","nv-x nv-axis"),w.append("g").attr("class","nv-y nv-axis"),w.append("g").attr("class","nv-barsWrap"),A.attr("transform","translate("+e.left+","+e.top+")"),b.width(s).height(t);var B=A.select(".nv-barsWrap").datum(h.filter(function(a){return!a.disabled}));d3.transition(B).call(b),z.append("clipPath").attr("id","nv-x-label-clip-"+b.id()).append("rect"),A.select("#nv-x-label-clip-"+b.id()+" rect").attr("width",l.rangeBand()*(i?2:1)).attr("height",16).attr("x",-l.rangeBand()/(i?1:2)),c.scale(l).ticks(s/100).tickSize(-t,0),A.select(".nv-x.nv-axis").attr("transform","translate(0,"+(m.range()[0]+(b.showValues()&&m.domain()[0]<0?16:0))+")"),A.select(".nv-x.nv-axis").transition().duration(0).call(c);var C=A.select(".nv-x.nv-axis").selectAll("g");i&&C.selectAll("text").attr("transform",function(a,b,c){return"translate(0,"+(c%2==0?"5":"17")+")"}),d.scale(m).ticks(t/36).tickSize(-s,0),d3.transition(A.select(".nv-y.nv-axis")).call(d),o.on("tooltipShow",function(a){j&&p(a,r.parentNode)})}),q}var b=a.models.discreteBar(),c=a.models.axis(),d=a.models.axis(),e={top:15,right:10,bottom:50,left:60},f=null,g=null,h=a.utils.getColor(),i=!1,j=!0,k=function(a,b,c,d,e){return"<h3>"+b+"</h3>"+"<p>"+c+"</p>"},l,m,n="No Data Available.",o=d3.dispatch("tooltipShow","tooltipHide");c.orient("bottom").highlightZero(!1).showMaxMin(!1).tickFormat(function(a){return a}),d.orient("left").tickFormat(d3.format(",.1f"));var p=function(e,f){var g=e.pos[0]+(f.offsetLeft||0),h=e.pos[1]+(f.offsetTop||0),i=c.tickFormat()(b.x()(e.point,e.pointIndex)),j=d.tickFormat()(b.y()(e.point,e.pointIndex)),l=k(e.series.key,i,j,e,q);a.tooltip.show([g,h],l,e.value<0?"n":"s",null,f)};return b.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+e.left,a.pos[1]+e.top],o.tooltipShow(a)}),b.dispatch.on("elementMouseout.tooltip",function(a){o.tooltipHide(a)}),o.on("tooltipHide",function(){j&&a.tooltip.cleanup()}),q.dispatch=o,q.discretebar=b,q.xAxis=c,q.yAxis=d,d3.rebind(q,b,"x","y","xDomain","yDomain","forceX","forceY","id","showValues","valueFormat"),q.margin=function(a){return arguments.length?(e.top=typeof a.top!="undefined"?a.top:e.top,e.right=typeof a.right!="undefined"?a.right:e.right,e.bottom=typeof a.bottom!="undefined"?a.bottom:e.bottom,e.left=typeof a.left!="undefined"?a.left:e.left,q):e},q.width=function(a){return arguments.length?(f=a,q):f},q.height=function(a){return arguments.length?(g=a,q):g},q.color=function(c){return arguments.length?(h=a.utils.getColor(c),b.color(h),q):h},q.staggerLabels=function(a){return arguments.length?(i=a,q):i},q.tooltips=function(a){return arguments.length?(j=a,q):j},q.tooltipContent=function(a){return arguments.length?(k=a,q):k},q.noData=function(a){return arguments.length?(n=a,q):n},q},a.models.distribution=function(){function k(a){return a.each(function(a){var i=c-(e==="x"?b.left+b.right:b.top+b.bottom),k=e=="x"?"y":"x",l=d3.select(this);j=j||h;var m=l.selectAll("g.nv-distribution").data([a]),n=m.enter().append("g").attr("class","nvd3 nv-distribution"),o=n.append("g"),p=m.select("g");m.attr("transform","translate("+b.left+","+b.top+")");var q=p.selectAll("g.nv-dist").data(function(a){return
),C=A.append("g"),D=z.select("g");C.append("g").attr("class","nv-groups"),z.attr("transform","translate("+b.left+","+b.top+")"),B.append("clipPath").attr("id","nv-edge-clip-"+g).append("rect"),z.select("#nv-edge-clip-"+g+" rect").attr("width",t).attr("height",u),D.attr("clip-path",k?"url(#nv-edge-clip-"+g+")":"");var E=z.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});E.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(E.exit()).selectAll("rect.nv-bar").delay(function(b,c){return c*n/a[0].values.length}).attr("y",function(a){return l?s(a.y0):s(0)}).attr("height",0).remove(),E.attr("class",function(a,b){return"nv-group nv-series-"+b}).classed("hover",function(a){return a.hover}).style("fill",function(a,b){return m(a,b)}).style("stroke",function(a,b){return m(a,b)}),d3.transition(E).style("stroke-opacity",1).style("fill-opacity",.75);var F=E.selectAll("rect.nv-bar").data(function(a){return a.values});F.exit().remove();var G=F.enter().append("rect").attr("class",function(a,b){return i(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(b,c,d){return l?0:d*e.rangeBand()/a.length}).attr("y",function(a){return s(l?a.y0:0)}).attr("height",0).attr("width",e.rangeBand()/(l?1:a.length));F.style("fill",function(a,b,c){return m(a,c,b)}).style("stroke",function(a,b,c){return m(a,c,b)}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),q.elementMouseover({value:i(b,c),point:b,series:a[b.series],pos:[e(h(b,c))+e.rangeBand()*(l?a.length/2:b.series+.5)/a.length,f(i(b,c)+(l?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),q.elementMouseout({value:i(b,c),point:b,series:a[b.series],pointIndex:c,seriesIndex:b.series,e:d3.event})}).on("click",function(b,c){q.elementClick({value:i(b,c),point:b,series:a[b.series],pos:[e(h(b,c))+e.rangeBand()*(l?a.length/2:b.series+.5)/a.length,f(i(b,c)+(l?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}).on("dblclick",function(b,c){q.elementDblClick({value:i(b,c),point:b,series:a[b.series],pos:[e(h(b,c))+e.rangeBand()*(l?a.length/2:b.series+.5)/a.length,f(i(b,c)+(l?b.y0:0))],pointIndex:c,seriesIndex:b.series,e:d3.event}),d3.event.stopPropagation()}),F.attr("class",function(a,b){return i(a,b)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(a,b){return"translate("+e(h(a,b))+",0)"}),l?d3.transition(F).delay(function(b,c){return c*n/a[0].values.length}).attr("y",function(a,b){return f(i(a,b)+(l?a.y0:0))}).attr("height",function(a,b){return Math.max(Math.abs(f(a.y+(l?a.y0:0))-f(l?a.y0:0)),1)}).each("end",function(){d3.transition(d3.select(this)).attr("x",function(b,c){return l?0:b.series*e.rangeBand()/a.length}).attr("width",e.rangeBand()/(l?1:a.length))}):d3.transition(F).delay(function(b,c){return c*n/a[0].values.length}).attr("x",function(b,c){return b.series*e.rangeBand()/a.length}).attr("width",e.rangeBand()/a.length).each("end",function(){d3.transition(d3.select(this)).attr("y",function(a,b){return i(a,b)<0?f(0):f(0)-f(i(a,b))<1?f(0)-1:f(i(a,b))}).attr("height",function(a,b){return Math.max(Math.abs(f(i(a,b))-f(0)),1)})}),r=e.copy(),s=f.copy()}),t}var b={top:0,right:0,bottom:0,left:0},c=960,d=500,e=d3.scale.ordinal(),f=d3.scale.linear(),g=Math.floor(Math.random()*1e4),h=function(a){return a.x},i=function(a){return a.y},j=[0],k=!0,l=!1,m=a.utils.defaultColor(),n=1200,o,p,q=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),r,s;return t.dispatch=q,t.x=function(a){return arguments.length?(h=a,t):h},t.y=function(a){return arguments.length?(i=a,t):i},t.margin=function(a){return arguments.length?(b.top=typeof a.top!="undefined"?a.top:b.top,b.right=typeof a.right!="undefined"?a.right:b.right,b.bottom=typeof a.bottom!="undefined"?a.bottom:b.bottom,b.left=typeof a.left!="undefined"?a.left:b.left,t):b},t.width=function(a){return arguments.length?(c=a,t):c},t.height=function(a){return arguments.length?(d=a,t):d},t.xScale=function(a){ret
.outerRadius(q-q/5);n&&w.innerRadius(q/2);var x=d3.layout.pie().sort(null).value(function(a){return a.disabled?0:g(a)}),y=s.select(".nv-pie").selectAll(".nv-slice").data(x);y.exit().remove();var z=y.enter().append("g").attr("class","nv-slice").on("mouseover",function(a,b){d3.select(this).classed("hover",!0),o.elementMouseover({label:f(a.data),value:g(a.data),point:a.data,pointIndex:b,pos:[d3.event.pageX,d3.event.pageY],id:h})}).on("mouseout",function(a,b){d3.select(this).classed("hover",!1),o.elementMouseout({label:f(a.data),value:g(a.data),point:a.data,index:b,id:h})}).on("click",function(a,b){o.elementClick({label:f(a.data),value:g(a.data),point:a.data,index:b,pos:d3.event,id:h}),d3.event.stopPropagation()}).on("dblclick",function(a,b){o.elementDblClick({label:f(a.data),value:g(a.data),point:a.data,index:b,pos:d3.event,id:h}),d3.event.stopPropagation()});y.attr("fill",function(a,b){return i(a,b)}).attr("stroke",function(a,b){return i(a,b)});var A=z.append("path").each(function(a){this._current=a});d3.transition(y.select("path")).attr("d",w).attrTween("d",D);if(k){var B=w;l&&(B=d3.svg.arc().outerRadius(w.outerRadius())),z.append("g").classed("nv-label",!0).each(function(a,b){var c=d3.select(this);c.attr("transform",function(a){return a.outerRadius=q+10,a.innerRadius=q+15,"translate("+B.centroid(a)+")"}),c.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),c.append("text").style("text-anchor","middle").style("fill","#000")}),y.select(".nv-label").transition().attr("transform",function(a){return a.outerRadius=q+10,a.innerRadius=q+15,"translate("+B.centroid(a)+")"}),y.each(function(a,b){var c=d3.select(this);c.select(".nv-label text").text(function(a,b){var c=(a.endAngle-a.startAngle)/(2*Math.PI);return a.value&&c>m?f(a.data):""});var d=c.select("text").node().getBBox();c.select(".nv-label rect").attr("width",d.width+10).attr("height",d.height+10).attr("transform",function(){return"translate("+[d.x-5,d.y-5]+")"})})}}),p}var b={top:0,right:0,bottom:0,left:0},c=500,d=500,e=function(a){return a.values},f=function(a){return a.x},g=function(a){return a.y},h=Math.floor(Math.random()*1e4),i=a.utils.defaultColor(),j=d3.format(",.2f"),k=!0,l=!1,m=.02,n=!1,o=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");return p.dispatch=o,p.margin=function(a){return arguments.length?(b.top=typeof a.top!="undefined"?a.top:b.top,b.right=typeof a.right!="undefined"?a.right:b.right,b.bottom=typeof a.bottom!="undefined"?a.bottom:b.bottom,b.left=typeof a.left!="undefined"?a.left:b.left,p):b},p.width=function(a){return arguments.length?(c=a,p):c},p.height=function(a){return arguments.length?(d=a,p):d},p.values=function(a){return arguments.length?(e=a,p):e},p.x=function(a){return arguments.length?(f=a,p):f},p.y=function(a){return arguments.length?(g=d3.functor(a),p):g},p.showLabels=function(a){return arguments.length?(k=a,p):k},p.donutLabelsOutside=function(a){return arguments.length?(l=a,p):l},p.donut=function(a){return arguments.length?(n=a,p):n},p.id=function(a){return arguments.length?(h=a,p):h},p.color=function(b){return arguments.length?(i=a.utils.getColor(b),p):i},p.valueFormat=function(a){return arguments.length?(j=a,p):j},p.labelThreshold=function(a){return arguments.length?(m=a,p):m},p},a.models.pieChart=function(){function n(a){return a.each(function(h){var i=d3.select(this),j=this,m=(e||parseInt(i.style("width"))||960)-d.left-d.right,o=(f||parseInt(i.style("height"))||400)-d.top-d.bottom;n.update=function(){n(a)},n.container=this;if(!h||!h.length){var p=i.selectAll(".nv-noData").data([k]);return p.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),p.attr("x",d.left+m/2).attr("y",d.top+o/2).text(function(a){return a}),n}i.selectAll(".nv-noData").remove();var q=i.selectAll("g.nv-wrap.nv-pieChart").data([h]),r=q.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),s=q.select("g");r.append("g").attr("class","nv-pieWrap"),r.append("g").attr("class","nv-legendWrap"),g&&(c.width(m).key(b.x()),q.se
(a),m):i},m.xScale=function(a){return arguments.length?(f=a,m):f},m.yScale=function(a){return arguments.length?(g=a,m):g},m.xDomain=function(a){return arguments.length?(k=a,m):k},m.yDomain=function(a){return arguments.length?(l=a,m):l},m.animate=function(a){return arguments.length?(e=a,m):e},m.color=function(b){return arguments.length?(j=a.utils.getColor(b),m):j},m},a.models.sparklinePlus=function(){function n(a){return a.each(function(l){function C(){if(i)return;var a=w.selectAll(".nv-hoverValue").data(h),d=a.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);a.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),a.attr("transform",function(a){return"translate("+f(b.x()(l[a],a))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1);if(!h.length)return;d.append("line").attr("x1",0).attr("y1",-c.top).attr("x2",0).attr("y2",q),d.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-c.top).attr("text-anchor","end").attr("dy",".9em"),w.select(".nv-hoverValue .nv-xValue").text(j(b.x()(l[h[0]],h[0]))),d.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-c.top).attr("text-anchor","start").attr("dy",".9em"),w.select(".nv-hoverValue .nv-yValue").text(k(b.y()(l[h[0]],h[0])))}function D(){function d(a,c){var d=Math.abs(b.x()(a[0],0)-c),e=0;for(var f=0;f<a.length;f++)Math.abs(b.x()(a[f],f)-c)<d&&(d=Math.abs(b.x()(a[f],f)-c),e=f);return e}if(i)return;var a=d3.mouse(this)[0]-c.left;h=[d(l,Math.round(f.invert(a)))],C()}var o=d3.select(this),p=(d||parseInt(o.style("width"))||960)-c.left-c.right,q=(e||parseInt(o.style("height"))||400)-c.top-c.bottom,r=b.y()(l[l.length-1],l.length-1);n.update=function(){n(a)},n.container=this;if(!l||!l.length){var s=o.selectAll(".nv-noData").data([m]);return s.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),s.attr("x",c.left+p/2).attr("y",c.top+q/2).text(function(a){return a}),n}o.selectAll(".nv-noData").remove(),f=b.xScale(),g=b.yScale();var t=o.selectAll("g.nv-wrap.nv-sparklineplus").data([l]),u=t.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus"),v=u.append("g"),w=t.select("g");v.append("g").attr("class","nv-sparklineWrap"),v.append("g").attr("class","nv-valueWrap"),v.append("g").attr("class","nv-hoverArea"),t.attr("transform","translate("+c.left+","+c.top+")");var z=w.select(".nv-sparklineWrap");b.width(p).height(q),z.call(b);var A=w.select(".nv-valueWrap"),B=A.selectAll(".nv-currentValue").data([r]);B.enter().append("text").attr("class","nv-currentValue").attr("dx",8).attr("dy",".65em"),B.attr("x",p).attr("y",function(a){return g(a)}).style("fill",b.color()(l[l.length-1],l.length-1)).text(k(r)),v.select(".nv-hoverArea").append("rect").on("mousemove",D).on("click",function(){i=!i}).on("mouseout",function(){h=[],C()}),w.select(".nv-hoverArea rect").attr("transform",function(a){return"translate("+ -c.left+","+ -c.top+")"}).attr("width",p+c.left+c.right).attr("height",q+c.top)}),n}var b=a.models.sparkline(),c={top:15,right:100,bottom:10,left:50},d=null,e=null,f,g,h=[],i=!1,j=d3.format(",r"),k=d3.format(",.2f"),l=!0,m="No Data Available.";return n.sparkline=b,d3.rebind(n,b,"x","y","xScale","yScale","color"),n.margin=function(a){return arguments.length?(c.top=typeof a.top!="undefined"?a.top:c.top,c.right=typeof a.right!="undefined"?a.right:c.right,c.bottom=typeof a.bottom!="undefined"?a.bottom:c.bottom,c.left=typeof a.left!="undefined"?a.left:c.left,n):c},n.width=function(a){return arguments.length?(d=a,n):d},n.height=function(a){return arguments.length?(e=a,n):e},n.xTickFormat=function(a){return arguments.length?(j=a,n):j},n.yTickFormat=function(a){return arguments.length?(k=a,n):k},n.showValue=function(a){return arguments.length?(l=a,n):l},n.noData=function(a){return arguments.length?(m=a,n):m},n},a.models.stackedArea=function(){function r(a){return a.each(function(a){var i=c-b.left-b.right,r=d-b.top-b.bottom,s=d3.select(this);n=p.xScale(),o=p.yScale(),a=a.map(function(a,b){return a.values=a.val