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
150 KiB
JavaScript

(function(){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}}function b(a,b){return(new Date(b,a+1,0)).getDate()}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(c){c=c||1,a.render.active=!0,a.dispatch.render_start(),setTimeout(function(){var b,d;for(var e=0;e<c&&(d=a.render.queue[e]);e++)b=d.generate(),typeof d.callback==typeof Function&&d.callback(b),a.graphs.push(b);a.render.queue.splice(0,e),a.render.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)}h.style.left=p+"px",h.style.top=q+"px",h.style.opacity=1,h.style.position="absolute",h.style.pointerEvents="none";return 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};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);return 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){if(!arguments.length)return a.utils.defaultColor();return Object.proto
,b))-g(0))||1)}),r=f.copy(),s=g.copy()});return t}var b={top:0,right:0,bottom:0,left:0},c=960,d=500,e=Math.floor(Math.random()*1e4),f=d3.scale.ordinal(),g=d3.scale.linear(),h=function(a){return a.x},i=function(a){return a.y},j=[0],k=a.utils.defaultColor(),l=!1,m=d3.format(",.2f"),n,o,p=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),q="discreteBar",r,s;t.dispatch=p,t.x=function(a){if(!arguments.length)return h;h=a;return t},t.y=function(a){if(!arguments.length)return i;i=a;return t},t.margin=function(a){if(!arguments.length)return b;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;return t},t.width=function(a){if(!arguments.length)return c;c=a;return t},t.height=function(a){if(!arguments.length)return d;d=a;return t},t.xScale=function(a){if(!arguments.length)return f;f=a;return t},t.yScale=function(a){if(!arguments.length)return g;g=a;return t},t.xDomain=function(a){if(!arguments.length)return n;n=a;return t},t.yDomain=function(a){if(!arguments.length)return o;o=a;return t},t.forceY=function(a){if(!arguments.length)return j;j=a;return t},t.color=function(b){if(!arguments.length)return k;k=a.utils.getColor(b);return t},t.id=function(a){if(!arguments.length)return e;e=a;return t},t.showValues=function(a){if(!arguments.length)return l;l=a;return t},t.valueFormat=function(a){if(!arguments.length)return m;m=a;return t},t.rectClass=function(a){if(!arguments.length)return q;q=a;return t};return t},a.models.discreteBarChart=function(){function q(a){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(){o.beforeUpdate(),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]);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});return 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)})});return 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","beforeUpdate");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,
,c,A);a.tooltip.show([g,h],k,null,null,f)};b.dispatch.on("elementMouseover.tooltip",function(a){a.pos=[a.pos[0]+j.left,a.pos[1]+j.top],y.tooltipShow(a)}),b.dispatch.on("elementMouseout.tooltip",function(a){y.tooltipHide(a)}),y.on("tooltipHide",function(){v&&a.tooltip.cleanup()}),A.dispatch=y,A.legend=h,A.lines=b,A.lines2=c,A.xAxis=d,A.yAxis=e,A.x2Axis=f,A.y2Axis=g,d3.rebind(A,b,"defined","isArea","size","xDomain","yDomain","forceX","forceY","interactive","clipEdge","clipVoronoi","id"),A.x=function(a){if(!arguments.length)return b.x;b.x(a),c.x(a);return A},A.y=function(a){if(!arguments.length)return b.y;b.y(a),c.y(a);return A},A.margin=function(a){if(!arguments.length)return j;j.top=typeof a.top!="undefined"?a.top:j.top,j.right=typeof a.right!="undefined"?a.right:j.right,j.bottom=typeof a.bottom!="undefined"?a.bottom:j.bottom,j.left=typeof a.left!="undefined"?a.left:j.left;return A},A.margin2=function(a){if(!arguments.length)return k;k=a;return A},A.width=function(a){if(!arguments.length)return m;m=a;return A},A.height=function(a){if(!arguments.length)return n;n=a;return A},A.height2=function(a){if(!arguments.length)return o;o=a;return A},A.color=function(b){if(!arguments.length)return l;l=a.utils.getColor(b),h.color(l);return A},A.showLegend=function(a){if(!arguments.length)return t;t=a;return A},A.tooltips=function(a){if(!arguments.length)return v;v=a;return A},A.tooltipContent=function(a){if(!arguments.length)return w;w=a;return A},A.interpolate=function(a){if(!arguments.length)return b.interpolate();b.interpolate(a),c.interpolate(a);return A},A.noData=function(a){if(!arguments.length)return x;x=a;return A},A.xTickFormat=function(a){if(!arguments.length)return d.tickFormat();d.tickFormat(a),f.tickFormat(a);return A},A.yTickFormat=function(a){if(!arguments.length)return e.tickFormat();e.tickFormat(a),g.tickFormat(a);return A};return A},a.models.multiBar=function(){function v(a){a.each(function(a){var v=c-b.left-b.right,w=d-b.top-b.bottom,z=d3.select(this);l&&(a=d3.layout.stack().offset("zero").values(function(a){return a.values}).y(i)(a)),a=a.map(function(a,b){a.values=a.values.map(function(a){a.series=b;return a});return a}),l&&a[0].values.map(function(b,c){var d=0,e=0;a.map(function(a){var b=a.values[c];b.size=Math.abs(b.y),b.y<0?(b.y1=e,e=e-b.size):(b.y1=b.size+d,d=d+b.size)})});var A=q&&r?[]:a.map(function(a){return a.values.map(function(a,b){return{x:h(a,b),y:i(a,b),y0:a.y0,y1:a.y1}})});e.domain(d3.merge(A).map(function(a){return a.x})).rangeBands([0,v],.1),f.domain(r||d3.extent(d3.merge(A).map(function(a){return l?a.y>0?a.y1:a.y1+a.y:a.y}).concat(j))).range([w,0]);if(e.domain()[0]===e.domain()[1]||f.domain()[0]===f.domain()[1])singlePoint=!0;e.domain()[0]===e.domain()[1]&&(e.domain()[0]?e.domain([e.domain()[0]-e.domain()[0]*.01,e.domain()[1]+e.domain()[1]*.01]):e.domain([-1,1])),f.domain()[0]===f.domain()[1]&&(f.domain()[0]?f.domain([f.domain()[0]+f.domain()[0]*.01,f.domain()[1]-f.domain()[1]*.01]):f.domain([-1,1])),t=t||e,u=u||f;var B=z.selectAll("g.nv-wrap.nv-multibar").data([a]),C=B.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),D=C.append("defs"),E=C.append("g"),F=B.select("g");E.append("g").attr("class","nv-groups"),B.attr("transform","translate("+b.left+","+b.top+")"),D.append("clipPath").attr("id","nv-edge-clip-"+g).append("rect"),B.select("#nv-edge-clip-"+g+" rect").attr("width",v).attr("height",w),F.attr("clip-path",k?"url(#nv-edge-clip-"+g+")":"");var G=B.select(".nv-groups").selectAll(".nv-group").data(function(a){return a},function(a){return a.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),d3.transition(G.exit()).selectAll("rect.nv-bar").delay(function(b,c){return c*p/a[0].values.length}).attr("y",function(a){return l?u(a.y0):u(0)}).attr("height",0).remove(),G.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(G).style("stroke-opacity",1).style("fill-opacity",.75);var H=G.selectAll("rect.nv-bar").da
n,y.bars1=o,y.bars2=p,y.stack1=q,y.stack2=r,y.xAxis=s,y.yAxis1=t,y.yAxis2=u,y.x=function(a){if(!arguments.length)return getX;getX=a,m.x(a),o.x(a);return y},y.y=function(a){if(!arguments.length)return getY;getY=a,m.y(a),o.y(a);return y},y.margin=function(a){if(!arguments.length)return b;b=a;return y},y.width=function(a){if(!arguments.length)return d;d=a;return y},y.height=function(a){if(!arguments.length)return e;e=a;return y},y.color=function(a){if(!arguments.length)return c;c=a,v.color(a);return y},y.showLegend=function(a){if(!arguments.length)return f;f=a;return y},y.tooltips=function(a){if(!arguments.length)return g;g=a;return y},y.tooltipContent=function(a){if(!arguments.length)return h;h=a;return y};return y},a.models.ohlcBar=function(){function v(a){a.each(function(a){var r=c-b.left-b.right,v=d-b.top-b.bottom,w=d3.select(this);f.domain(s||d3.extent(a[0].values.map(h).concat(n))),p?f.range([r*.5/a[0].values.length,r*(a[0].values.length-.5)/a[0].values.length]):f.range([0,r]),g.domain(t||[d3.min(a[0].values.map(m).concat(o)),d3.max(a[0].values.map(l).concat(o))]).range([v,0]);if(f.domain()[0]===f.domain()[1]||g.domain()[0]===g.domain()[1])singlePoint=!0;f.domain()[0]===f.domain()[1]&&(f.domain()[0]?f.domain([f.domain()[0]-f.domain()[0]*.01,f.domain()[1]+f.domain()[1]*.01]):f.domain([-1,1])),g.domain()[0]===g.domain()[1]&&(g.domain()[0]?g.domain([g.domain()[0]+g.domain()[0]*.01,g.domain()[1]-g.domain()[1]*.01]):g.domain([-1,1]));var z=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([a[0].values]),A=z.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),B=A.append("defs"),C=A.append("g"),D=z.select("g");C.append("g").attr("class","nv-ticks"),z.attr("transform","translate("+b.left+","+b.top+")"),w.on("click",function(a,b){u.chartClick({data:a,index:b,pos:d3.event,id:e})}),B.append("clipPath").attr("id","nv-chart-clip-path-"+e).append("rect"),z.select("#nv-chart-clip-path-"+e+" rect").attr("width",r).attr("height",v),D.attr("clip-path",q?"url(#nv-chart-clip-path-"+e+")":"");var E=z.select(".nv-ticks").selectAll(".nv-tick").data(function(a){return a});E.exit().remove();var F=E.enter().append("path").attr("class",function(a,b,c){return(j(a,b)>k(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}).attr("d",function(b,c){var d=r/a[0].values.length*.9;return"m0,0l0,"+(g(j(b,c))-g(l(b,c)))+"l"+ -d/2+",0l"+d/2+",0l0,"+(g(m(b,c))-g(j(b,c)))+"l0,"+(g(k(b,c))-g(m(b,c)))+"l"+d/2+",0l"+ -d/2+",0z"}).attr("transform",function(a,b){return"translate("+f(h(a,b))+","+g(l(a,b))+")"}).on("mouseover",function(b,c){d3.select(this).classed("hover",!0),u.elementMouseover({point:b,series:a[0],pos:[f(h(b,c)),g(i(b,c))],pointIndex:c,seriesIndex:0,e:d3.event})}).on("mouseout",function(b,c){d3.select(this).classed("hover",!1),u.elementMouseout({point:b,series:a[0],pointIndex:c,seriesIndex:0,e:d3.event})}).on("click",function(a,b){u.elementClick({value:i(a,b),data:a,index:b,pos:[f(h(a,b)),g(i(a,b))],e:d3.event,id:e}),d3.event.stopPropagation()}).on("dblclick",function(a,b){u.elementDblClick({value:i(a,b),data:a,index:b,pos:[f(h(a,b)),g(i(a,b))],e:d3.event,id:e}),d3.event.stopPropagation()});E.attr("class",function(a,b,c){return(j(a,b)>k(a,b)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+c+"-"+b}),d3.transition(E).attr("transform",function(a,b){return"translate("+f(h(a,b))+","+g(l(a,b))+")"}).attr("d",function(b,c){var d=r/a[0].values.length*.9;return"m0,0l0,"+(g(j(b,c))-g(l(b,c)))+"l"+ -d/2+",0l"+d/2+",0l0,"+(g(m(b,c))-g(j(b,c)))+"l0,"+(g(k(b,c))-g(m(b,c)))+"l"+d/2+",0l"+ -d/2+",0z"})});return v}var b={top:0,right:0,bottom:0,left:0},c=960,d=500,e=Math.floor(Math.random()*1e4),f=d3.scale.linear(),g=d3.scale.linear(),h=function(a){return a.x},i=function(a){return a.y},j=function(a){return a.open},k=function(a){return a.close},l=function(a){return a.high},m=function(a){return a.low},n=[],o=[],p=!1,q=!0,r=a.utils.defaultColor(),s,t,u=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");v.dispatch=u,v.x=function(a){if(!arguments.length)return h;h=a;return v},v.y=function(a){if(!a
]),M.select(".nv-controlsWrap").datum(E).attr("transform","translate(0,"+ -i.top+")").call(f)),b.width(G).height(H).color(v.map(function(a,b){return a.color||l(a,b)}).filter(function(a,b){return!v[b].disabled})),J.select(".nv-scatterWrap").datum(v.filter(function(a){return!a.disabled})).call(b),J.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+b.id()+")");var N=J.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(a){return a}),O=N.enter().append("g").attr("class","nv-regLines").append("line").attr("class","nv-regLine").style("stroke-opacity",0);N.selectAll(".nv-regLines line").attr("x1",m.range()[0]).attr("x2",m.range()[1]).attr("y1",function(a,b){return n(m.domain()[0]*a.slope+a.intercept)}).attr("y2",function(a,b){return n(m.domain()[1]*a.slope+a.intercept)}).style("stroke",function(a,b,c){return l(a,c)}).style("stroke-opacity",function(a,b){return a.disabled||typeof a.slope=="undefined"||typeof a.intercept=="undefined"?0:1}),c.scale(m).ticks(c.ticks()?c.ticks():G/100).tickSize(-H,0),M.select(".nv-x.nv-axis").attr("transform","translate(0,"+n.range()[0]+")").call(c),d.scale(n).ticks(d.ticks()?d.ticks():H/36).tickSize(-G,0),M.select(".nv-y.nv-axis").call(d),o&&(g.getData(b.x()).scale(m).width(G).color(v.map(function(a,b){return a.color||l(a,b)}).filter(function(a,b){return!v[b].disabled})),L.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),M.select(".nv-distributionX").attr("transform","translate(0,"+n.range()[0]+")").datum(v.filter(function(a){return!a.disabled})).call(g)),p&&(h.getData(b.y()).scale(n).width(H).color(v.map(function(a,b){return a.color||l(a,b)}).filter(function(a,b){return!v[b].disabled})),L.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),M.select(".nv-distributionY").attr("transform","translate(-"+h.size()+",0)").datum(v.filter(function(a){return!a.disabled})).call(h)),d3.fisheye&&(M.select(".nv-background").attr("width",G).attr("height",H),M.select(".nv-background").on("mousemove",P),M.select(".nv-background").on("click",function(){t=!t}),b.dispatch.on("elementClick.freezeFisheye",function(){t=!t})),f.dispatch.on("legendClick",function(e,f){e.disabled=!e.disabled,s=e.disabled?0:2.5,M.select(".nv-background").style("pointer-events",e.disabled?"none":"all"),M.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none"),e.disabled?(m.distortion(s).focus(0),n.distortion(s).focus(0),M.select(".nv-scatterWrap").call(b),M.select(".nv-x.nv-axis").call(c),M.select(".nv-y.nv-axis").call(d)):t=!1,F(a)}),e.dispatch.on("legendClick",function(b,c,d){b.disabled=!b.disabled,v.filter(function(a){return!a.disabled}).length||v.map(function(a){a.disabled=!1,J.selectAll(".nv-series").classed("disabled",!1);return a}),A.disabled=v.map(function(a){return!!a.disabled}),y.stateChange(A),F(a)}),b.dispatch.on("elementMouseover.tooltip",function(a){d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-distx-"+a.pointIndex).attr("y1",a.pos[1]-H),d3.select(".nv-chart-"+b.id()+" .nv-series-"+a.seriesIndex+" .nv-disty-"+a.pointIndex).attr("x2",a.pos[0]+g.size()),a.pos=[a.pos[0]+i.left,a.pos[1]+i.top],y.tooltipShow(a)}),y.on("tooltipShow",function(a){u&&D(a,x.parentNode)}),y.on("changeState",function(b){typeof b.disabled!="undefined"&&(v.forEach(function(a,c){a.disabled=b.disabled[c]}),A.disabled=b.disabled),a.call(F)}),B=m.copy(),C=n.copy()});return F}var b=a.models.scatter(),c=a.models.axis(),d=a.models.axis(),e=a.models.legend(),f=a.models.legend(),g=a.models.distribution(),h=a.models.distribution(),i={top:30,right:20,bottom:50,left:75},j=null,k=null,l=a.utils.defaultColor(),m=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.xScale(),n=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):b.yScale(),o=!1,p=!1,q=!0,r=!!d3.fisheye,s=0,t=!1,u=!0,v=function(a,b,c){return"<strong>"+b+"</strong>"},w=function(a,b,c){return"<strong>"+c+"</strong>"},x=function(a,b,c,d){return"<h3>"+a+"</h3>"+"<p>"+d+"</p>"},y=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),z="No Data Available.";b.xScale(m).yS