Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a bug in d3.scale.log ticks.

  • Loading branch information...
commit 29efd2a6d5e27cfaa63ed559ec4986af53aaa80a 1 parent b49c878
@mbostock mbostock authored
View
4 d3.js
@@ -1,4 +1,4 @@
-(function(){d3 = {version: "1.8.3"}; // semver
+(function(){d3 = {version: "1.8.4"}; // semver
if (!Date.now) Date.now = function() {
return +new Date();
};
@@ -2067,7 +2067,7 @@ d3.scale.log = function() {
j = Math.ceil(d[1]),
u = pow(d[0]),
v = pow(d[1]);
- if (n) {
+ if (log === d3_scale_logn) {
ticks.push(pow(i));
for (; i++ < j;) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
} else {
View
106 d3.min.js
@@ -1,70 +1,70 @@
-(function(){function za(a){for(var b=-1,c=a.length,g=[];++b<c;)g.push(a[b]);return g}function w(a){return typeof a=="function"?a:function(){return a}}function Aa(a){return a==null}function ea(a){return a.replace(/(^\s+)|(\s+$)/g,"").replace(/\s+/g," ")}function fa(a){a.apply(this,(arguments[0]=this,arguments));return this}function Ba(){var a={},b=[];a.add=function(c){for(var g=0;g<b.length;g++)if(b[g].listener==c)return a;b.push({listener:c,on:true});return a};a.remove=function(c){for(var g=0;g<b.length;g++){var e=
-b[g];if(e.listener==c){e.on=false;b=b.slice(0,g).concat(b.slice(g+1));break}}return a};a.dispatch=function(){for(var c=b,g=0,e=c.length;g<e;g++){var d=c[g];d.on&&d.listener.apply(this,arguments)}};return a}function ga(a){for(var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),g=[];b>0;)g.push(a.substring(b-=3,b+3));return g.reverse().join(",")+c}function ha(a){return function(b){return 1-a(1-b)}}function ia(a){return function(b){return 0.5*(b<0.5?a(2*b):2-a(2-2*b))}}function Ca(a){return a}
-function R(a){return function(b){return Math.pow(b,a)}}function Da(a){return 1-Math.cos(a*Math.PI/2)}function Ea(a){return a?Math.pow(2,10*(a-1))-0.0010:0}function Fa(a){return 1-Math.sqrt(1-a*a)}function Ga(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375}function J(a,b,c){return{r:a,g:b,b:c,toString:Ha}}function Ha(){return"#"+S(this.r)+S(this.g)+S(this.b)}function S(a){return a<16?"0"+a.toString(16):a.toString(16)}
-function T(a,b,c){var g=0,e=0,d=0,f,h;if(f=/([a-z]+)\((.*)\)/i.exec(a)){h=f[2].split(",");switch(f[1]){case "hsl":return c(parseFloat(h[0]),parseFloat(h[1])/100,parseFloat(h[2])/100);case "rgb":return b(U(h[0]),U(h[1]),U(h[2]))}}if(c=G[a])return b(c.r,c.g,c.b);if(a!=null&&a.charAt(0)=="#"){if(a.length==4){g=a.charAt(1);g+=g;e=a.charAt(2);e+=e;d=a.charAt(3);d+=d}else if(a.length==7){g=a.substring(1,3);e=a.substring(3,5);d=a.substring(5,7)}g=parseInt(g,16);e=parseInt(e,16);d=parseInt(d,16)}return b(g,
-e,d)}function Ia(a,b,c){var g=Math.min(a/=255,b/=255,c/=255),e=Math.max(a,b,c),d=e-g,f=(e+g)/2;if(d){g=f<0.5?d/(e+g):d/(2-e-g);a=a==e?(b-c)/d+(b<c?6:0):b==e?(c-a)/d+2:(a-b)/d+4;a*=60}else g=a=0;return V(a,g,f)}function U(a){var b=parseFloat(a);return a.charAt(a.length-1)=="%"?Math.round(b*2.55):b}function V(a,b,c){return{h:a,s:b,l:c,toString:Ja}}function Ja(){return"hsl("+this.h+","+this.s*100+"%,"+this.l*100+"%)"}function W(a,b,c){function g(f){if(f>360)f-=360;else if(f<0)f+=360;if(f<60)return e+
-(d-e)*f/60;if(f<180)return d;if(f<240)return e+(d-e)*(240-f)/60;return e}var e,d;a%=360;if(a<0)a+=360;b=b<0?0:b>1?1:b;c=c<0?0:c>1?1:c;d=c<=0.5?c*(1+b):c+b-c*b;e=2*c-d;return J(Math.round(g(a+120)*255),Math.round(g(a)*255),Math.round(g(a-120)*255))}function z(a){function b(e){for(var d=[],f,h,i,k,j=0,p=a.length;j<p;j++){i=a[j];d.push(f=[]);f.parentNode=i.parentNode;f.parentData=i.parentData;for(var q=0,m=i.length;q<m;q++)if(k=i[q]){f.push(h=e(k));if(h&&"__data__"in k)h.__data__=k.__data__}else f.push(null)}return z(d)}
-function c(e){for(var d=[],f,h,i,k=0,j=a.length;k<j;k++){h=a[k];for(var p=0,q=h.length;p<q;p++)if(i=h[p]){d.push(f=e(i));f.parentNode=i;f.parentData=i.__data__}}return z(d)}function g(e){for(var d=0,f=a.length;d<f;d++)for(var h=a[d],i=0,k=h.length;i<k;i++){var j=h[i];if(j)return e.call(j,j.__data__,i)}return null}a.select=function(e){return b(function(d){return D(e,d)})};a.selectAll=function(e){return c(function(d){return ja(e,d)})};a.filter=function(e){for(var d=[],f,h,i,k=0,j=a.length;k<j;k++){h=
-a[k];d.push(f=[]);f.parentNode=h.parentNode;f.parentData=h.parentData;for(var p=0,q=h.length;p<q;p++)if((i=h[p])&&e.call(i,i.__data__,p))f.push(i)}return z(d)};a.map=function(e){for(var d,f,h=0,i=a.length;h<i;h++){d=a[h];for(var k=0,j=d.length;k<j;k++)if(f=d[k])f.__data__=e.call(f,f.__data__,k)}return a};a.data=function(e,d){function f(m,o){var l=0,r=m.length,s=o.length,u=Math.min(r,s),v=Math.max(r,s),t=[],A=[],x=[],y,B;if(d){u={};v=[];var E;B=o.length;for(l=0;l<r;l++){E=d.call(y=m[l],y.__data__,
-l);if(E in u)x[B++]=m[l];else{u[E]=y;v.push(E)}}for(l=0;l<s;l++){if(y=u[E=d.call(o,B=o[l],l)]){y.__data__=B;t[l]=y;A[l]=x[l]=null}else{A[l]={__data__:B};t[l]=x[l]=null}delete u[E]}for(l=0;l<r;l++)if(v[l]in u)x[l]=m[l]}else{for(;l<u;l++){y=m[l];B=o[l];if(y){y.__data__=B;t[l]=y;A[l]=x[l]=null}else{A[l]={__data__:B};t[l]=x[l]=null}}for(;l<s;l++){A[l]={__data__:o[l]};t[l]=x[l]=null}for(;l<v;l++){x[l]=m[l];A[l]=t[l]=null}}A.parentNode=t.parentNode=x.parentNode=m.parentNode;A.parentData=t.parentData=x.parentData=
-m.parentData;h.push(A);i.push(t);k.push(x)}var h=[],i=[],k=[],j=-1,p=a.length,q;if(typeof e=="function")for(;++j<p;)f(q=a[j],e.call(q,q.parentData,j));else for(;++j<p;)f(q=a[j],e);j=z(i);j.enter=function(){return Ka(h)};j.exit=function(){return z(k)};return j};a.each=function(e){for(var d=0,f=a.length;d<f;d++)for(var h=a[d],i=0,k=h.length;i<k;i++){var j=h[i];j&&e.call(j,j.__data__,i)}return a};a.empty=function(){return!g(function(){return true})};a.node=function(){return g(function(){return this})};
-a.attr=function(e,d){function f(){this.removeAttribute(e)}function h(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,d)}function k(){this.setAttributeNS(e.space,e.local,d)}function j(){var q=d.apply(this,arguments);q==null?this.removeAttribute(e):this.setAttribute(e,q)}function p(){var q=d.apply(this,arguments);q==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,q)}e=d3.ns.qualify(e);if(arguments.length<2)return g(e.local?function(){return this.getAttributeNS(e.space,
-e.local)}:function(){return this.getAttribute(e)});return a.each(d==null?e.local?h:f:typeof d=="function"?e.local?p:j:e.local?k:i)};a.classed=function(e,d){function f(){var j=this.className;k.lastIndex=0;if(!k.test(j))this.className=ea(j+" "+e)}function h(){var j=ea(this.className.replace(k," "));this.className=j.length?j:null}function i(){(d.apply(this,arguments)?f:h).call(this)}var k=RegExp("(^|\\s+)"+d3.requote(e)+"(\\s+|$)","g");if(arguments.length<2)return g(function(){k.lastIndex=0;return k.test(this.className)});
+(function(){function ya(a){for(var b=-1,c=a.length,g=[];++b<c;)g.push(a[b]);return g}function v(a){return typeof a=="function"?a:function(){return a}}function za(a){return a==null}function ea(a){return a.replace(/(^\s+)|(\s+$)/g,"").replace(/\s+/g," ")}function fa(a){a.apply(this,(arguments[0]=this,arguments));return this}function Aa(){var a={},b=[];a.add=function(c){for(var g=0;g<b.length;g++)if(b[g].listener==c)return a;b.push({listener:c,on:true});return a};a.remove=function(c){for(var g=0;g<b.length;g++){var e=
+b[g];if(e.listener==c){e.on=false;b=b.slice(0,g).concat(b.slice(g+1));break}}return a};a.dispatch=function(){for(var c=b,g=0,e=c.length;g<e;g++){var d=c[g];d.on&&d.listener.apply(this,arguments)}};return a}function ga(a){for(var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),g=[];b>0;)g.push(a.substring(b-=3,b+3));return g.reverse().join(",")+c}function ha(a){return function(b){return 1-a(1-b)}}function ia(a){return function(b){return 0.5*(b<0.5?a(2*b):2-a(2-2*b))}}function Ba(a){return a}
+function Q(a){return function(b){return Math.pow(b,a)}}function Ca(a){return 1-Math.cos(a*Math.PI/2)}function Da(a){return a?Math.pow(2,10*(a-1))-0.0010:0}function Ea(a){return 1-Math.sqrt(1-a*a)}function Fa(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375}function I(a,b,c){return{r:a,g:b,b:c,toString:Ga}}function Ga(){return"#"+R(this.r)+R(this.g)+R(this.b)}function R(a){return a<16?"0"+a.toString(16):a.toString(16)}
+function S(a,b,c){var g=0,e=0,d=0,f,h;if(f=/([a-z]+)\((.*)\)/i.exec(a)){h=f[2].split(",");switch(f[1]){case "hsl":return c(parseFloat(h[0]),parseFloat(h[1])/100,parseFloat(h[2])/100);case "rgb":return b(T(h[0]),T(h[1]),T(h[2]))}}if(c=F[a])return b(c.r,c.g,c.b);if(a!=null&&a.charAt(0)=="#"){if(a.length==4){g=a.charAt(1);g+=g;e=a.charAt(2);e+=e;d=a.charAt(3);d+=d}else if(a.length==7){g=a.substring(1,3);e=a.substring(3,5);d=a.substring(5,7)}g=parseInt(g,16);e=parseInt(e,16);d=parseInt(d,16)}return b(g,
+e,d)}function Ha(a,b,c){var g=Math.min(a/=255,b/=255,c/=255),e=Math.max(a,b,c),d=e-g,f=(e+g)/2;if(d){g=f<0.5?d/(e+g):d/(2-e-g);a=a==e?(b-c)/d+(b<c?6:0):b==e?(c-a)/d+2:(a-b)/d+4;a*=60}else g=a=0;return U(a,g,f)}function T(a){var b=parseFloat(a);return a.charAt(a.length-1)=="%"?Math.round(b*2.55):b}function U(a,b,c){return{h:a,s:b,l:c,toString:Ia}}function Ia(){return"hsl("+this.h+","+this.s*100+"%,"+this.l*100+"%)"}function V(a,b,c){function g(f){if(f>360)f-=360;else if(f<0)f+=360;if(f<60)return e+
+(d-e)*f/60;if(f<180)return d;if(f<240)return e+(d-e)*(240-f)/60;return e}var e,d;a%=360;if(a<0)a+=360;b=b<0?0:b>1?1:b;c=c<0?0:c>1?1:c;d=c<=0.5?c*(1+b):c+b-c*b;e=2*c-d;return I(Math.round(g(a+120)*255),Math.round(g(a)*255),Math.round(g(a-120)*255))}function y(a){function b(e){for(var d=[],f,h,i,k,j=0,o=a.length;j<o;j++){i=a[j];d.push(f=[]);f.parentNode=i.parentNode;f.parentData=i.parentData;for(var p=0,m=i.length;p<m;p++)if(k=i[p]){f.push(h=e(k));if(h&&"__data__"in k)h.__data__=k.__data__}else f.push(null)}return y(d)}
+function c(e){for(var d=[],f,h,i,k=0,j=a.length;k<j;k++){h=a[k];for(var o=0,p=h.length;o<p;o++)if(i=h[o]){d.push(f=e(i));f.parentNode=i;f.parentData=i.__data__}}return y(d)}function g(e){for(var d=0,f=a.length;d<f;d++)for(var h=a[d],i=0,k=h.length;i<k;i++){var j=h[i];if(j)return e.call(j,j.__data__,i)}return null}a.select=function(e){return b(function(d){return C(e,d)})};a.selectAll=function(e){return c(function(d){return ja(e,d)})};a.filter=function(e){for(var d=[],f,h,i,k=0,j=a.length;k<j;k++){h=
+a[k];d.push(f=[]);f.parentNode=h.parentNode;f.parentData=h.parentData;for(var o=0,p=h.length;o<p;o++)if((i=h[o])&&e.call(i,i.__data__,o))f.push(i)}return y(d)};a.map=function(e){for(var d,f,h=0,i=a.length;h<i;h++){d=a[h];for(var k=0,j=d.length;k<j;k++)if(f=d[k])f.__data__=e.call(f,f.__data__,k)}return a};a.data=function(e,d){function f(m,n){var l=0,q=m.length,r=n.length,t=Math.min(q,r),u=Math.max(q,r),s=[],z=[],w=[],x,A;if(d){t={};u=[];var D;A=n.length;for(l=0;l<q;l++){D=d.call(x=m[l],x.__data__,
+l);if(D in t)w[A++]=m[l];else{t[D]=x;u.push(D)}}for(l=0;l<r;l++){if(x=t[D=d.call(n,A=n[l],l)]){x.__data__=A;s[l]=x;z[l]=w[l]=null}else{z[l]={__data__:A};s[l]=w[l]=null}delete t[D]}for(l=0;l<q;l++)if(u[l]in t)w[l]=m[l]}else{for(;l<t;l++){x=m[l];A=n[l];if(x){x.__data__=A;s[l]=x;z[l]=w[l]=null}else{z[l]={__data__:A};s[l]=w[l]=null}}for(;l<r;l++){z[l]={__data__:n[l]};s[l]=w[l]=null}for(;l<u;l++){w[l]=m[l];z[l]=s[l]=null}}z.parentNode=s.parentNode=w.parentNode=m.parentNode;z.parentData=s.parentData=w.parentData=
+m.parentData;h.push(z);i.push(s);k.push(w)}var h=[],i=[],k=[],j=-1,o=a.length,p;if(typeof e=="function")for(;++j<o;)f(p=a[j],e.call(p,p.parentData,j));else for(;++j<o;)f(p=a[j],e);j=y(i);j.enter=function(){return Ja(h)};j.exit=function(){return y(k)};return j};a.each=function(e){for(var d=0,f=a.length;d<f;d++)for(var h=a[d],i=0,k=h.length;i<k;i++){var j=h[i];j&&e.call(j,j.__data__,i)}return a};a.empty=function(){return!g(function(){return true})};a.node=function(){return g(function(){return this})};
+a.attr=function(e,d){function f(){this.removeAttribute(e)}function h(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,d)}function k(){this.setAttributeNS(e.space,e.local,d)}function j(){var p=d.apply(this,arguments);p==null?this.removeAttribute(e):this.setAttribute(e,p)}function o(){var p=d.apply(this,arguments);p==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,p)}e=d3.ns.qualify(e);if(arguments.length<2)return g(e.local?function(){return this.getAttributeNS(e.space,
+e.local)}:function(){return this.getAttribute(e)});return a.each(d==null?e.local?h:f:typeof d=="function"?e.local?o:j:e.local?k:i)};a.classed=function(e,d){function f(){var j=this.className;k.lastIndex=0;if(!k.test(j))this.className=ea(j+" "+e)}function h(){var j=ea(this.className.replace(k," "));this.className=j.length?j:null}function i(){(d.apply(this,arguments)?f:h).call(this)}var k=RegExp("(^|\\s+)"+d3.requote(e)+"(\\s+|$)","g");if(arguments.length<2)return g(function(){k.lastIndex=0;return k.test(this.className)});
return a.each(typeof d=="function"?i:d?f:h)};a.style=function(e,d,f){function h(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,d,f)}function k(){var j=d.apply(this,arguments);j==null?this.style.removeProperty(e):this.style.setProperty(e,j,f)}if(arguments.length<3)f=null;if(arguments.length<2)return g(function(){return window.getComputedStyle(this,null).getPropertyValue(e)});return a.each(d==null?h:typeof d=="function"?k:i)};a.property=function(e,d){function f(){delete this[e]}
function h(){this[e]=d}function i(){var k=d.apply(this,arguments);if(k==null)delete this[e];else this[e]=k}e=d3.ns.qualify(e);if(arguments.length<2)return g(function(){return this[e]});return a.each(d==null?f:typeof d=="function"?i:h)};a.text=function(e){function d(){this.appendChild(document.createTextNode(e))}function f(){var h=e.apply(this,arguments);h!=null&&this.appendChild(document.createTextNode(h))}if(arguments.length<1)return g(function(){return this.textContent});a.each(function(){for(;this.lastChild;)this.removeChild(this.lastChild)});
return e==null?a:a.each(typeof e=="function"?f:d)};a.html=function(e){function d(){this.innerHTML=e}function f(){this.innerHTML=e.apply(this,arguments)}if(arguments.length<1)return g(function(){return this.innerHTML});return a.each(typeof e=="function"?f:d)};a.append=function(e){function d(h){return h.appendChild(document.createElement(e))}function f(h){return h.appendChild(document.createElementNS(e.space,e.local))}e=d3.ns.qualify(e);return b(e.local?f:d)};a.insert=function(e,d){function f(i){return i.insertBefore(document.createElement(e),
-D(d,i))}function h(i){return i.insertBefore(document.createElementNS(e.space,e.local),D(d,i))}e=d3.ns.qualify(e);return b(e.local?h:f)};a.remove=function(){return b(function(e){var d=e.parentNode;d.removeChild(e);return d})};a.sort=function(e){e=La.apply(this,arguments);for(var d=0,f=a.length;d<f;d++){var h=a[d];h.sort(e);for(var i=1,k=h.length,j=h[0];i<k;i++){var p=h[i];if(p){j&&j.parentNode.insertBefore(p,j.nextSibling);j=p}}}return a};a.on=function(e,d){var f=e.indexOf("."),h=f==-1?e:e.substring(0,
-f),i="__on"+e;return a.each(function(k,j){function p(q){var m=d3.event;d3.event=q;try{d.call(this,k,j)}finally{d3.event=m}}this[i]&&this.removeEventListener(h,this[i],false);if(d)this.addEventListener(h,this[i]=p,false)})};a.transition=function(){return X(a)};a.call=fa;return a}function Ka(a){function b(c){for(var g=[],e,d,f,h,i=0,k=a.length;i<k;i++){f=a[i];g.push(e=[]);e.parentNode=f.parentNode;e.parentData=f.parentData;for(var j=0,p=f.length;j<p;j++)if(h=f[j]){e.push(d=c(f.parentNode));d.__data__=
-h.__data__}else e.push(null)}return z(g)}a.append=function(c){function g(d){return d.appendChild(document.createElement(c))}function e(d){return d.appendChild(document.createElementNS(c.space,c.local))}c=d3.ns.qualify(c);return b(c.local?e:g)};a.insert=function(c,g){function e(f){return f.insertBefore(document.createElement(c),D(g,f))}function d(f){return f.insertBefore(document.createElementNS(c.space,c.local),D(g,f))}c=d3.ns.qualify(c);return b(c.local?d:e)};return a}function La(a){if(!arguments.length)a=
-d3.ascending;return function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function X(a){function b(m){var o=true,l=-1;a.each(function(){if(i[++l]!=2){var r=(m-k[l])/j[l],s=this.__transition__,u,v,t=d[l];if(r<1){o=false;if(r<0)return}else r=1;if(i[l]){if(!s||s.active!=g){i[l]=2;return}}else if(!s||s.active>g){i[l]=2;return}else{i[l]=1;h.start.dispatch.apply(this,arguments);t=d[l]={};s.active=g;for(v in e)t[v]=e[v].apply(this,arguments)}u=q(r);for(v in e)t[v].call(this,u);if(r==1){i[l]=2;if(s.active==
-g){r=s.owner;if(r==g){delete this.__transition__;f&&this.parentNode.removeChild(this)}Y=g;h.end.dispatch.apply(this,arguments);Y=0;s.owner=r}}}});return o}var c={},g=Y||++Ma,e={},d=[],f=false,h=d3.dispatch("start","end"),i=[],k=[],j=[],p,q=d3.ease("cubic-in-out");a.each(function(){(this.__transition__||(this.__transition__={})).owner=g});c.delay=function(m){var o=Infinity,l=-1;if(typeof m=="function")a.each(function(){var r=k[++l]=+m.apply(this,arguments);if(r<o)o=r});else{o=+m;a.each(function(){k[++l]=
-o})}ka(b,o);return c};c.duration=function(m){var o=-1;if(typeof m=="function"){p=0;a.each(function(){var l=j[++o]=+m.apply(this,arguments);if(l>p)p=l})}else{p=+m;a.each(function(){j[++o]=p})}return c};c.ease=function(m){q=typeof m=="function"?m:d3.ease.apply(d3,arguments);return c};c.attrTween=function(m,o){function l(s,u){var v=o.call(this,s,u,this.getAttribute(m));return function(t){this.setAttribute(m,v(t))}}function r(s,u){var v=o.call(this,s,u,this.getAttributeNS(m.space,m.local));return function(t){this.setAttributeNS(m.space,
-m.local,v(t))}}e["attr."+m]=m.local?r:l;return c};c.attr=function(m,o){return c.attrTween(m,la(o))};c.styleTween=function(m,o,l){if(arguments.length<3)l=null;e["style."+m]=function(r,s){var u=o.call(this,r,s,window.getComputedStyle(this,null).getPropertyValue(m));return function(v){this.style.setProperty(m,u(v),l)}};return c};c.style=function(m,o,l){if(arguments.length<3)l=null;return c.styleTween(m,la(o),l)};c.select=function(m){var o;m=X(a.select(m)).ease(q);o=-1;m.delay(function(){return k[++o]});
-o=-1;m.duration(function(){return j[++o]});return m};c.selectAll=function(m){var o;m=X(a.selectAll(m)).ease(q);o=-1;m.delay(function(l,r){return k[r?o:++o]});o=-1;m.duration(function(l,r){return j[r?o:++o]});return m};c.remove=function(){f=true;return c};c.each=function(m,o){h[m].add(o);return c};c.call=fa;return c.delay(0).duration(250)}function la(a){return typeof a=="function"?function(b,c,g){return d3.interpolate(g,String(a.call(this,b,c)))}:(a=String(a),function(b,c,g){return d3.interpolate(g,
-a)})}function ka(a,b){var c=Date.now(),g=false,e=c+b,d=F;if(isFinite(b)){for(;d;){if(d.callback==a){d.then=c;d.delay=b;g=true}else{var f=d.then+d.delay;if(f<e)e=f}d=d.next}g||(F={callback:a,then:c,delay:b,next:F});if(!K){clearTimeout(Z);Z=setTimeout(Na,Math.max(24,e-c))}}}function Na(){K=1;Z=0;ma(na)}function na(){for(var a,b=Date.now(),c=F;c;){a=b-c.then;if(a>c.delay)c.flush=c.callback(a);c=c.next}a=null;for(b=F;b;)b=b.flush?a?a.next=b.next:F=b.next:(a=b).next;a||(K=0);K&&ma(na)}function $(a){return Math.log(a)/
-Math.LN10}function oa(a){return-Math.log(-a)/Math.LN10}function Oa(a){return function(b){return Math.pow(b,a)}}function Pa(a){return function(b){return-Math.pow(-b,a)}}function Qa(a){return a.innerRadius}function Ra(a){return a.outerRadius}function pa(a){return a.startAngle}function qa(a){return a.endAngle}function aa(a,b,c,g){var e=[],d=-1,f=b.length,h=typeof c=="function",i=typeof g=="function",k;if(h&&i)for(;++d<f;)e.push([c.call(a,k=b[d],d),g.call(a,k,d)]);else if(h)for(;++d<f;)e.push([c.call(a,
-b[d],d),g]);else if(i)for(;++d<f;)e.push([c,g.call(a,b[d],d)]);else for(;++d<f;)e.push([c,g]);return e}function ra(a){return a[0]}function sa(a){return a[1]}function H(a){var b=[],c=0,g=a.length,e=a[0];for(b.push(e[0],",",e[1]);++c<g;)b.push("L",(e=a[c])[0],",",e[1]);return b.join("")}function ta(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return H(a);var c=a.length!=b.length,g="",e=a[0],d=a[1],f=b[0],h=f,i=1;if(c){g+="Q"+(d[0]-f[0]*2/3)+","+(d[1]-f[1]*2/3)+","+d[0]+","+d[1];e=a[1];
-i=2}if(b.length>1){h=b[1];d=a[i];i++;g+="C"+(e[0]+f[0])+","+(e[1]+f[1])+","+(d[0]-h[0])+","+(d[1]-h[1])+","+d[0]+","+d[1];for(e=2;e<b.length;e++,i++){d=a[i];h=b[e];g+="S"+(d[0]-h[0])+","+(d[1]-h[1])+","+d[0]+","+d[1]}}if(c){c=a[i];g+="Q"+(d[0]+h[0]*2/3)+","+(d[1]+h[1]*2/3)+","+c[0]+","+c[1]}return g}function ua(a,b){for(var c=[],g=(1-b)/2,e=a[0],d=a[1],f=a[2],h=2,i=a.length;++h<i;){c.push([g*(f[0]-e[0]),g*(f[1]-e[1])]);e=d;d=f;f=a[h]}c.push([g*(f[0]-e[0]),g*(f[1]-e[1])]);return c}function C(a,b){return a[0]*
-b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function L(a,b,c){a.push("C",C(va,b),",",C(va,c),",",C(wa,b),",",C(wa,c),",",C(M,b),",",C(M,c))}function Sa(){return 0}function Ta(a){return a.source}function Ua(a){return a.target}function Va(a){return a.radius}function Wa(){return 64}function Xa(){return"circle"}d3={version:"1.8.3"};if(!Date.now)Date.now=function(){return+new Date};if(!Object.create)Object.create=function(a){function b(){}b.prototype=a;return new b};var N=function(a){return Array.prototype.slice.call(a)};
-try{N(document.documentElement.childNodes)}catch(jb){N=za}d3.rebind=function(a,b){return function(){var c=b.apply(a,arguments);return arguments.length?a:c}};d3.ascending=function(a,b){return a<b?-1:a>b?1:0};d3.descending=function(a,b){return b<a?-1:b>a?1:0};d3.min=function(a,b){var c=0,g=a.length,e=a[0],d;if(arguments.length==1)for(;++c<g;){if(e>(d=a[c]))e=d}else for(e=b(a[0]);++c<g;)if(e>(d=b(a[c])))e=d;return e};d3.max=function(a,b){var c=0,g=a.length,e=a[0],d;if(arguments.length==1)for(;++c<g;){if(e<
-(d=a[c]))e=d}else for(e=b(e);++c<g;)if(e<(d=b(a[c])))e=d;return e};d3.nest=function(){function a(h,i){if(i>=g.length)return f?f.call(c,h):d?h.sort(d):h;for(var k=-1,j=h.length,p=g[i++],q,m,o={};++k<j;)if((q=p(m=h[k]))in o)o[q].push(m);else o[q]=[m];for(q in o)o[q]=a(o[q],i);return o}function b(h,i){if(i>=g.length)return h;var k=[],j=e[i++],p;for(p in h)k.push({key:p,values:b(h[p],i)});j&&k.sort(function(q,m){return j(q.key,m.key)});return k}var c={},g=[],e=[],d,f;c.map=function(h){return a(h,0)};
+C(d,i))}function h(i){return i.insertBefore(document.createElementNS(e.space,e.local),C(d,i))}e=d3.ns.qualify(e);return b(e.local?h:f)};a.remove=function(){return b(function(e){var d=e.parentNode;d.removeChild(e);return d})};a.sort=function(e){e=Ka.apply(this,arguments);for(var d=0,f=a.length;d<f;d++){var h=a[d];h.sort(e);for(var i=1,k=h.length,j=h[0];i<k;i++){var o=h[i];if(o){j&&j.parentNode.insertBefore(o,j.nextSibling);j=o}}}return a};a.on=function(e,d){var f=e.indexOf("."),h=f==-1?e:e.substring(0,
+f),i="__on"+e;return a.each(function(k,j){function o(p){var m=d3.event;d3.event=p;try{d.call(this,k,j)}finally{d3.event=m}}this[i]&&this.removeEventListener(h,this[i],false);if(d)this.addEventListener(h,this[i]=o,false)})};a.transition=function(){return W(a)};a.call=fa;return a}function Ja(a){function b(c){for(var g=[],e,d,f,h,i=0,k=a.length;i<k;i++){f=a[i];g.push(e=[]);e.parentNode=f.parentNode;e.parentData=f.parentData;for(var j=0,o=f.length;j<o;j++)if(h=f[j]){e.push(d=c(f.parentNode));d.__data__=
+h.__data__}else e.push(null)}return y(g)}a.append=function(c){function g(d){return d.appendChild(document.createElement(c))}function e(d){return d.appendChild(document.createElementNS(c.space,c.local))}c=d3.ns.qualify(c);return b(c.local?e:g)};a.insert=function(c,g){function e(f){return f.insertBefore(document.createElement(c),C(g,f))}function d(f){return f.insertBefore(document.createElementNS(c.space,c.local),C(g,f))}c=d3.ns.qualify(c);return b(c.local?d:e)};return a}function Ka(a){if(!arguments.length)a=
+d3.ascending;return function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function W(a){function b(m){var n=true,l=-1;a.each(function(){if(i[++l]!=2){var q=(m-k[l])/j[l],r=this.__transition__,t,u,s=d[l];if(q<1){n=false;if(q<0)return}else q=1;if(i[l]){if(!r||r.active!=g){i[l]=2;return}}else if(!r||r.active>g){i[l]=2;return}else{i[l]=1;h.start.dispatch.apply(this,arguments);s=d[l]={};r.active=g;for(u in e)s[u]=e[u].apply(this,arguments)}t=p(q);for(u in e)s[u].call(this,t);if(q==1){i[l]=2;if(r.active==
+g){q=r.owner;if(q==g){delete this.__transition__;f&&this.parentNode.removeChild(this)}X=g;h.end.dispatch.apply(this,arguments);X=0;r.owner=q}}}});return n}var c={},g=X||++La,e={},d=[],f=false,h=d3.dispatch("start","end"),i=[],k=[],j=[],o,p=d3.ease("cubic-in-out");a.each(function(){(this.__transition__||(this.__transition__={})).owner=g});c.delay=function(m){var n=Infinity,l=-1;if(typeof m=="function")a.each(function(){var q=k[++l]=+m.apply(this,arguments);if(q<n)n=q});else{n=+m;a.each(function(){k[++l]=
+n})}ka(b,n);return c};c.duration=function(m){var n=-1;if(typeof m=="function"){o=0;a.each(function(){var l=j[++n]=+m.apply(this,arguments);if(l>o)o=l})}else{o=+m;a.each(function(){j[++n]=o})}return c};c.ease=function(m){p=typeof m=="function"?m:d3.ease.apply(d3,arguments);return c};c.attrTween=function(m,n){function l(r,t){var u=n.call(this,r,t,this.getAttribute(m));return function(s){this.setAttribute(m,u(s))}}function q(r,t){var u=n.call(this,r,t,this.getAttributeNS(m.space,m.local));return function(s){this.setAttributeNS(m.space,
+m.local,u(s))}}e["attr."+m]=m.local?q:l;return c};c.attr=function(m,n){return c.attrTween(m,la(n))};c.styleTween=function(m,n,l){if(arguments.length<3)l=null;e["style."+m]=function(q,r){var t=n.call(this,q,r,window.getComputedStyle(this,null).getPropertyValue(m));return function(u){this.style.setProperty(m,t(u),l)}};return c};c.style=function(m,n,l){if(arguments.length<3)l=null;return c.styleTween(m,la(n),l)};c.select=function(m){var n;m=W(a.select(m)).ease(p);n=-1;m.delay(function(){return k[++n]});
+n=-1;m.duration(function(){return j[++n]});return m};c.selectAll=function(m){var n;m=W(a.selectAll(m)).ease(p);n=-1;m.delay(function(l,q){return k[q?n:++n]});n=-1;m.duration(function(l,q){return j[q?n:++n]});return m};c.remove=function(){f=true;return c};c.each=function(m,n){h[m].add(n);return c};c.call=fa;return c.delay(0).duration(250)}function la(a){return typeof a=="function"?function(b,c,g){return d3.interpolate(g,String(a.call(this,b,c)))}:(a=String(a),function(b,c,g){return d3.interpolate(g,
+a)})}function ka(a,b){var c=Date.now(),g=false,e=c+b,d=E;if(isFinite(b)){for(;d;){if(d.callback==a){d.then=c;d.delay=b;g=true}else{var f=d.then+d.delay;if(f<e)e=f}d=d.next}g||(E={callback:a,then:c,delay:b,next:E});if(!J){clearTimeout(Y);Y=setTimeout(Ma,Math.max(24,e-c))}}}function Ma(){J=1;Y=0;ma(na)}function na(){for(var a,b=Date.now(),c=E;c;){a=b-c.then;if(a>c.delay)c.flush=c.callback(a);c=c.next}a=null;for(b=E;b;)b=b.flush?a?a.next=b.next:E=b.next:(a=b).next;a||(J=0);J&&ma(na)}function Z(a){return Math.log(a)/
+Math.LN10}function $(a){return-Math.log(-a)/Math.LN10}function Na(a){return function(b){return Math.pow(b,a)}}function Oa(a){return function(b){return-Math.pow(-b,a)}}function Pa(a){return a.innerRadius}function Qa(a){return a.outerRadius}function oa(a){return a.startAngle}function pa(a){return a.endAngle}function aa(a,b,c,g){var e=[],d=-1,f=b.length,h=typeof c=="function",i=typeof g=="function",k;if(h&&i)for(;++d<f;)e.push([c.call(a,k=b[d],d),g.call(a,k,d)]);else if(h)for(;++d<f;)e.push([c.call(a,
+b[d],d),g]);else if(i)for(;++d<f;)e.push([c,g.call(a,b[d],d)]);else for(;++d<f;)e.push([c,g]);return e}function qa(a){return a[0]}function ra(a){return a[1]}function G(a){var b=[],c=0,g=a.length,e=a[0];for(b.push(e[0],",",e[1]);++c<g;)b.push("L",(e=a[c])[0],",",e[1]);return b.join("")}function sa(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return G(a);var c=a.length!=b.length,g="",e=a[0],d=a[1],f=b[0],h=f,i=1;if(c){g+="Q"+(d[0]-f[0]*2/3)+","+(d[1]-f[1]*2/3)+","+d[0]+","+d[1];e=a[1];
+i=2}if(b.length>1){h=b[1];d=a[i];i++;g+="C"+(e[0]+f[0])+","+(e[1]+f[1])+","+(d[0]-h[0])+","+(d[1]-h[1])+","+d[0]+","+d[1];for(e=2;e<b.length;e++,i++){d=a[i];h=b[e];g+="S"+(d[0]-h[0])+","+(d[1]-h[1])+","+d[0]+","+d[1]}}if(c){c=a[i];g+="Q"+(d[0]+h[0]*2/3)+","+(d[1]+h[1]*2/3)+","+c[0]+","+c[1]}return g}function ta(a,b){for(var c=[],g=(1-b)/2,e=a[0],d=a[1],f=a[2],h=2,i=a.length;++h<i;){c.push([g*(f[0]-e[0]),g*(f[1]-e[1])]);e=d;d=f;f=a[h]}c.push([g*(f[0]-e[0]),g*(f[1]-e[1])]);return c}function B(a,b){return a[0]*
+b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function K(a,b,c){a.push("C",B(ua,b),",",B(ua,c),",",B(va,b),",",B(va,c),",",B(L,b),",",B(L,c))}function Ra(){return 0}function Sa(a){return a.source}function Ta(a){return a.target}function Ua(a){return a.radius}function Va(){return 64}function Wa(){return"circle"}d3={version:"1.8.4"};if(!Date.now)Date.now=function(){return+new Date};if(!Object.create)Object.create=function(a){function b(){}b.prototype=a;return new b};var M=function(a){return Array.prototype.slice.call(a)};
+try{M(document.documentElement.childNodes)}catch(ib){M=ya}d3.rebind=function(a,b){return function(){var c=b.apply(a,arguments);return arguments.length?a:c}};d3.ascending=function(a,b){return a<b?-1:a>b?1:0};d3.descending=function(a,b){return b<a?-1:b>a?1:0};d3.min=function(a,b){var c=0,g=a.length,e=a[0],d;if(arguments.length==1)for(;++c<g;){if(e>(d=a[c]))e=d}else for(e=b(a[0]);++c<g;)if(e>(d=b(a[c])))e=d;return e};d3.max=function(a,b){var c=0,g=a.length,e=a[0],d;if(arguments.length==1)for(;++c<g;){if(e<
+(d=a[c]))e=d}else for(e=b(e);++c<g;)if(e<(d=b(a[c])))e=d;return e};d3.nest=function(){function a(h,i){if(i>=g.length)return f?f.call(c,h):d?h.sort(d):h;for(var k=-1,j=h.length,o=g[i++],p,m,n={};++k<j;)if((p=o(m=h[k]))in n)n[p].push(m);else n[p]=[m];for(p in n)n[p]=a(n[p],i);return n}function b(h,i){if(i>=g.length)return h;var k=[],j=e[i++],o;for(o in h)k.push({key:o,values:b(h[o],i)});j&&k.sort(function(p,m){return j(p.key,m.key)});return k}var c={},g=[],e=[],d,f;c.map=function(h){return a(h,0)};
c.entries=function(h){return b(a(h,0),0)};c.key=function(h){g.push(h);return c};c.sortKeys=function(h){e[g.length-1]=h;return c};c.sortValues=function(h){d=h;return c};c.rollup=function(h){f=h;return c};return c};d3.keys=function(a){var b=[],c;for(c in a)b.push(c);return b};d3.values=function(a){var b=[],c;for(c in a)b.push(a[c]);return b};d3.entries=function(a){var b=[],c;for(c in a)b.push({key:c,value:a[c]});return b};d3.merge=function(a){return Array.prototype.concat.apply([],a)};d3.split=function(a,
-b){var c=[],g=[],e,d=-1,f=a.length;if(arguments.length<2)b=Aa;for(;++d<f;)if(b.call(g,e=a[d],d))g=[];else{g.length||c.push(g);g.push(e)}return c};d3.range=function(a,b,c){if(arguments.length==1){b=a;a=0}if(c==null)c=1;if((b-a)/c==Infinity)throw Error("infinite range");var g=[],e=-1,d;if(c<0)for(;(d=a+c*++e)>b;)g.push(d);else for(;(d=a+c*++e)<b;)g.push(d);return g};d3.requote=function(a){return a.replace(Ya,"\\$&")};var Ya=/[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g;d3.xhr=function(a,b,c){var g=new XMLHttpRequest;
+b){var c=[],g=[],e,d=-1,f=a.length;if(arguments.length<2)b=za;for(;++d<f;)if(b.call(g,e=a[d],d))g=[];else{g.length||c.push(g);g.push(e)}return c};d3.range=function(a,b,c){if(arguments.length==1){b=a;a=0}if(c==null)c=1;if((b-a)/c==Infinity)throw Error("infinite range");var g=[],e=-1,d;if(c<0)for(;(d=a+c*++e)>b;)g.push(d);else for(;(d=a+c*++e)<b;)g.push(d);return g};d3.requote=function(a){return a.replace(Xa,"\\$&")};var Xa=/[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g;d3.xhr=function(a,b,c){var g=new XMLHttpRequest;
if(arguments.length<3)c=b;else b&&g.overrideMimeType&&g.overrideMimeType(b);g.open("GET",a,true);g.onreadystatechange=function(){if(g.readyState==4)c(g.status<300?g:null)};g.send(null)};d3.text=function(a,b,c){if(arguments.length<3){c=b;b=null}d3.xhr(a,b,function(g){c(g&&g.responseText)})};d3.json=function(a,b){d3.text(a,"application/json",function(c){b(c?JSON.parse(c):null)})};d3.html=function(a,b){d3.text(a,"text/html",function(c){if(c!=null){var g=document.createRange();g.selectNode(document.body);
c=g.createContextualFragment(c)}b(c)})};d3.xml=function(a,b,c){if(arguments.length<3){c=b;b=null}d3.xhr(a,b,function(g){c(g&&g.responseXML)})};d3.ns={prefix:{svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qualify:function(a){var b=a.indexOf(":");return b<0?a:{space:d3.ns.prefix[a.substring(0,b)],local:a.substring(b+1)}}};d3.dispatch=function(){for(var a={},
-b,c=0,g=arguments.length;c<g;c++){b=arguments[c];a[b]=Ba(b)}return a};d3.format=function(a){a=Za.exec(a);var b=a[1]||" ",c=a[3]||"",g=a[5],e=+a[6],d=a[7],f=a[8],h=a[9];if(f)f=f.substring(1);if(g){b="0";if(d)e-=Math.floor((e-1)/4)}if(h=="d")f="0";return function(i){i=+i;var k=i<0&&(i=-i)?"":c;if(h=="d"&&i%1)return"";i=f?i.toFixed(f):""+i;if(g){var j=i.length+k.length;if(j<e)i=Array(e-j+1).join(b)+i;if(d)i=ga(i);i=k+i}else{if(d)i=ga(i);i=k+i;j=i.length;if(j<e)i=Array(e-j+1).join(b)+i}return i}};var Za=
-/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,$a=R(2),ab=R(3),bb={linear:function(){return Ca},poly:R,quad:function(){return $a},cubic:function(){return ab},sin:function(){return Da},exp:function(){return Ea},circle:function(){return Fa},elastic:function(a,b){var c;if(arguments.length<2)b=0.45;if(arguments.length<1){a=1;c=b/4}else c=b/(2*Math.PI)*Math.asin(1/a);return function(g){return 1+a*Math.pow(2,10*-g)*Math.sin((g-c)*2*Math.PI/b)}},back:function(a){a||(a=1.70158);
-return function(b){return b*b*((a+1)*b-a)}},bounce:function(){return Ga}},cb={"in":function(a){return a},out:ha,"in-out":ia,"out-in":function(a){return ia(ha(a))}};d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a;b=b>=0?a.substring(b+1):"in";return cb[b](bb[c].apply(null,Array.prototype.slice.call(arguments,1)))};d3.event=null;d3.interpolate=function(a,b){if(typeof b=="number")return d3.interpolateNumber(+a,b);if(typeof b=="string")return b in G||/^(#|rgb\(|hsl\()/.test(b)?d3.interpolateRgb(String(a),
+b,c=0,g=arguments.length;c<g;c++){b=arguments[c];a[b]=Aa(b)}return a};d3.format=function(a){a=Ya.exec(a);var b=a[1]||" ",c=a[3]||"",g=a[5],e=+a[6],d=a[7],f=a[8],h=a[9];if(f)f=f.substring(1);if(g){b="0";if(d)e-=Math.floor((e-1)/4)}if(h=="d")f="0";return function(i){i=+i;var k=i<0&&(i=-i)?"":c;if(h=="d"&&i%1)return"";i=f?i.toFixed(f):""+i;if(g){var j=i.length+k.length;if(j<e)i=Array(e-j+1).join(b)+i;if(d)i=ga(i);i=k+i}else{if(d)i=ga(i);i=k+i;j=i.length;if(j<e)i=Array(e-j+1).join(b)+i}return i}};var Ya=
+/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,Za=Q(2),$a=Q(3),ab={linear:function(){return Ba},poly:Q,quad:function(){return Za},cubic:function(){return $a},sin:function(){return Ca},exp:function(){return Da},circle:function(){return Ea},elastic:function(a,b){var c;if(arguments.length<2)b=0.45;if(arguments.length<1){a=1;c=b/4}else c=b/(2*Math.PI)*Math.asin(1/a);return function(g){return 1+a*Math.pow(2,10*-g)*Math.sin((g-c)*2*Math.PI/b)}},back:function(a){a||(a=1.70158);
+return function(b){return b*b*((a+1)*b-a)}},bounce:function(){return Fa}},bb={"in":function(a){return a},out:ha,"in-out":ia,"out-in":function(a){return ia(ha(a))}};d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a;b=b>=0?a.substring(b+1):"in";return bb[b](ab[c].apply(null,Array.prototype.slice.call(arguments,1)))};d3.event=null;d3.interpolate=function(a,b){if(typeof b=="number")return d3.interpolateNumber(+a,b);if(typeof b=="string")return b in F||/^(#|rgb\(|hsl\()/.test(b)?d3.interpolateRgb(String(a),
b):d3.interpolateString(String(a),b);if(b instanceof Array)return d3.interpolateArray(a,b);return d3.interpolateObject(a,b)};d3.interpolateNumber=function(a,b){b-=a;return function(c){return a+b*c}};d3.interpolateRound=function(a,b){b-=a;return function(c){return Math.round(a+b*c)}};d3.interpolateString=function(a,b){var c,g,e=0,d=[],f=[],h,i;for(g=0;c=ba.exec(b);++g){c.index&&d.push(b.substring(e,c.index));f.push({i:d.length,x:c[0]});d.push(null);e=ba.lastIndex}e<b.length&&d.push(b.substring(e));
g=0;for(h=f.length;(c=ba.exec(a))&&g<h;++g){i=f[g];if(i.x==c[0]){if(i.i)if(d[i.i+1]==null){d[i.i-1]+=i.x;d.splice(i.i,1);for(c=g+1;c<h;++c)f[c].i--}else{d[i.i-1]+=i.x+d[i.i+1];d.splice(i.i,2);for(c=g+1;c<h;++c)f[c].i-=2}else if(d[i.i+1]==null)d[i.i]=i.x;else{d[i.i]=i.x+d[i.i+1];d.splice(i.i+1,1);for(c=g+1;c<h;++c)f[c].i--}f.splice(g,1);h--;g--}else i.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(i.x))}for(;g<h;){i=f.pop();if(d[i.i+1]==null)d[i.i]=i.x;else{d[i.i]=i.x+d[i.i+1];d.splice(i.i+1,1)}h--}if(d.length==
-1)return d[0]==null?f[0].x:function(){return b};return function(k){for(g=0;g<h;++g)d[(i=f[g]).i]=i.x(k);return d.join("")}};d3.interpolateRgb=function(a,b){a=d3.rgb(a);b=d3.rgb(b);var c=a.r,g=a.g,e=a.b,d=b.r-c,f=b.g-g,h=b.b-e;return function(i){return"rgb("+Math.round(c+d*i)+","+Math.round(g+f*i)+","+Math.round(e+h*i)+")"}};d3.interpolateHsl=function(a,b){a=d3.hsl(a);b=d3.hsl(b);var c=a.h,g=a.s,e=a.l,d=b.h-c,f=b.s-g,h=b.l-e;return function(i){return W(c+d*i,g+f*i,e+h*i).toString()}};d3.interpolateArray=
-function(a,b){var c=[],g=[],e=a.length,d=b.length,f=Math.min(a.length,b.length),h;for(h=0;h<f;++h)c.push(d3.interpolate(a[h],b[h]));for(;h<e;++h)g[h]=a[h];for(;h<d;++h)g[h]=b[h];return function(i){for(h=0;h<f;++h)g[h]=c[h](i);return g}};d3.interpolateObject=function(a,b){var c={},g={},e;for(e in a)if(e in b)c[e]=(e in db||/\bcolor\b/.test(e)?d3.interpolateRgb:d3.interpolate)(a[e],b[e]);else g[e]=a[e];for(e in b)e in a||(g[e]=b[e]);return function(d){for(e in c)g[e]=c[e](d);return g}};var ba=/[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,
-db={background:1,fill:1,stroke:1};d3.rgb=function(a,b,c){return arguments.length==1?T(""+a,J,W):J(~~a,~~b,~~c)};var G={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",
+1)return d[0]==null?f[0].x:function(){return b};return function(k){for(g=0;g<h;++g)d[(i=f[g]).i]=i.x(k);return d.join("")}};d3.interpolateRgb=function(a,b){a=d3.rgb(a);b=d3.rgb(b);var c=a.r,g=a.g,e=a.b,d=b.r-c,f=b.g-g,h=b.b-e;return function(i){return"rgb("+Math.round(c+d*i)+","+Math.round(g+f*i)+","+Math.round(e+h*i)+")"}};d3.interpolateHsl=function(a,b){a=d3.hsl(a);b=d3.hsl(b);var c=a.h,g=a.s,e=a.l,d=b.h-c,f=b.s-g,h=b.l-e;return function(i){return V(c+d*i,g+f*i,e+h*i).toString()}};d3.interpolateArray=
+function(a,b){var c=[],g=[],e=a.length,d=b.length,f=Math.min(a.length,b.length),h;for(h=0;h<f;++h)c.push(d3.interpolate(a[h],b[h]));for(;h<e;++h)g[h]=a[h];for(;h<d;++h)g[h]=b[h];return function(i){for(h=0;h<f;++h)g[h]=c[h](i);return g}};d3.interpolateObject=function(a,b){var c={},g={},e;for(e in a)if(e in b)c[e]=(e in cb||/\bcolor\b/.test(e)?d3.interpolateRgb:d3.interpolate)(a[e],b[e]);else g[e]=a[e];for(e in b)e in a||(g[e]=b[e]);return function(d){for(e in c)g[e]=c[e](d);return g}};var ba=/[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,
+cb={background:1,fill:1,stroke:1};d3.rgb=function(a,b,c){return arguments.length==1?S(""+a,I,V):I(~~a,~~b,~~c)};var F={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",
darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",
firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",
lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",
mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",
rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},
-ca;for(ca in G)G[ca]=T(G[ca],J,W);d3.hsl=function(a,b,c){return arguments.length==1?T(""+a,Ia,V):V(+a,+b,+c)};var D=function(a,b){return b.querySelector(a)},ja=function(a,b){return N(b.querySelectorAll(a))};if(typeof Sizzle=="function"){D=function(a,b){return Sizzle(a,b)[0]};ja=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))}}var O=z([[document]]);O[0].parentNode=document.documentElement;d3.select=function(a){return typeof a=="string"?O.select(a):z([[a]])};d3.selectAll=function(a){return typeof a==
-"string"?O.selectAll(a):z([N(a)])};d3.transition=O.transition;var Ma=0,Y=0,F=null,Z=0,K;d3.timer=function(a){ka(a,0)};var ma=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.scale={};d3.scale.linear=function(){function a(j){return k((j-c)*f)}function b(j){var p=Math.min(c,g),q=Math.max(c,g),m=q-p,o=Math.pow(10,Math.floor(Math.log(m/j)/Math.LN10));j/=m/o;
-if(j<=0.15)o*=10;else if(j<=0.35)o*=5;else if(j<=0.75)o*=2;return{start:Math.ceil(p/o)*o,stop:Math.floor(q/o)*o+o*0.5,step:o}}var c=0,g=1,e=0,d=1,f=1,h=1,i=d3.interpolate,k=i(e,d);a.invert=function(j){return(j-e)*h+c};a.domain=function(j){if(!arguments.length)return[c,g];c=+j[0];g=+j[1];f=1/(g-c);h=(g-c)/(d-e);return a};a.range=function(j){if(!arguments.length)return[e,d];e=j[0];d=j[1];h=(g-c)/(d-e);k=i(e,d);return a};a.rangeRound=function(j){return a.range(j).interpolate(d3.interpolateRound)};a.interpolate=
-function(j){if(!arguments.length)return i;k=(i=j)(e,d);return a};a.ticks=function(j){j=b(j);return d3.range(j.start,j.stop,j.step)};a.tickFormat=function(j){j=Math.max(0,-Math.floor(Math.log(b(j).step)/Math.LN10+0.01));return d3.format(",."+j+"f")};return a};d3.scale.log=function(){function a(e){return b(c(e))}var b=d3.scale.linear(),c=$,g=c.pow;a.invert=function(e){return g(b.invert(e))};a.domain=function(e){if(!arguments.length)return b.domain().map(g);c=(e[0]||e[1])<0?oa:$;g=c.pow;b.domain(e.map(c));
-return a};a.range=d3.rebind(a,b.range);a.rangeRound=d3.rebind(a,b.rangeRound);a.interpolate=d3.rebind(a,b.interpolate);a.ticks=function(){var e=b.domain(),d=[];if(e.every(isFinite)){var f=Math.floor(e[0]),h=Math.ceil(e[1]),i=g(e[0]);e=g(e[1]);if(n)for(d.push(g(f));f++<h;)for(var k=9;k>0;k--)d.push(g(f)*k);else{for(;f<h;f++)for(k=1;k<10;k++)d.push(g(f)*k);d.push(g(f))}for(f=0;d[f]<i;f++);for(h=d.length;d[h-1]>e;h--);d=d.slice(f,h)}return d};a.tickFormat=function(){return function(e){return e.toPrecision(1)}};
-return a};$.pow=function(a){return Math.pow(10,a)};oa.pow=function(a){return-Math.pow(10,-a)};d3.scale.pow=function(){function a(f){return b(e(f))}var b=d3.scale.linear(),c=d3.scale.linear(),g=1,e=Number,d=e;a.invert=function(f){return d(b.invert(f))};a.domain=function(f){if(!arguments.length)return b.domain().map(d);var h=(f[0]||f[1])<0?Pa:Oa;e=h(g);d=h(1/g);b.domain(f.map(e));c.domain(f);return a};a.range=d3.rebind(a,b.range);a.rangeRound=d3.rebind(a,b.rangeRound);a.interpolate=d3.rebind(a,b.interpolate);
+ca;for(ca in F)F[ca]=S(F[ca],I,V);d3.hsl=function(a,b,c){return arguments.length==1?S(""+a,Ha,U):U(+a,+b,+c)};var C=function(a,b){return b.querySelector(a)},ja=function(a,b){return M(b.querySelectorAll(a))};if(typeof Sizzle=="function"){C=function(a,b){return Sizzle(a,b)[0]};ja=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))}}var N=y([[document]]);N[0].parentNode=document.documentElement;d3.select=function(a){return typeof a=="string"?N.select(a):y([[a]])};d3.selectAll=function(a){return typeof a==
+"string"?N.selectAll(a):y([M(a)])};d3.transition=N.transition;var La=0,X=0,E=null,Y=0,J;d3.timer=function(a){ka(a,0)};var ma=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.scale={};d3.scale.linear=function(){function a(j){return k((j-c)*f)}function b(j){var o=Math.min(c,g),p=Math.max(c,g),m=p-o,n=Math.pow(10,Math.floor(Math.log(m/j)/Math.LN10));j/=m/n;
+if(j<=0.15)n*=10;else if(j<=0.35)n*=5;else if(j<=0.75)n*=2;return{start:Math.ceil(o/n)*n,stop:Math.floor(p/n)*n+n*0.5,step:n}}var c=0,g=1,e=0,d=1,f=1,h=1,i=d3.interpolate,k=i(e,d);a.invert=function(j){return(j-e)*h+c};a.domain=function(j){if(!arguments.length)return[c,g];c=+j[0];g=+j[1];f=1/(g-c);h=(g-c)/(d-e);return a};a.range=function(j){if(!arguments.length)return[e,d];e=j[0];d=j[1];h=(g-c)/(d-e);k=i(e,d);return a};a.rangeRound=function(j){return a.range(j).interpolate(d3.interpolateRound)};a.interpolate=
+function(j){if(!arguments.length)return i;k=(i=j)(e,d);return a};a.ticks=function(j){j=b(j);return d3.range(j.start,j.stop,j.step)};a.tickFormat=function(j){j=Math.max(0,-Math.floor(Math.log(b(j).step)/Math.LN10+0.01));return d3.format(",."+j+"f")};return a};d3.scale.log=function(){function a(e){return b(c(e))}var b=d3.scale.linear(),c=Z,g=c.pow;a.invert=function(e){return g(b.invert(e))};a.domain=function(e){if(!arguments.length)return b.domain().map(g);c=(e[0]||e[1])<0?$:Z;g=c.pow;b.domain(e.map(c));
+return a};a.range=d3.rebind(a,b.range);a.rangeRound=d3.rebind(a,b.rangeRound);a.interpolate=d3.rebind(a,b.interpolate);a.ticks=function(){var e=b.domain(),d=[];if(e.every(isFinite)){var f=Math.floor(e[0]),h=Math.ceil(e[1]),i=g(e[0]);e=g(e[1]);if(c===$)for(d.push(g(f));f++<h;)for(var k=9;k>0;k--)d.push(g(f)*k);else{for(;f<h;f++)for(k=1;k<10;k++)d.push(g(f)*k);d.push(g(f))}for(f=0;d[f]<i;f++);for(h=d.length;d[h-1]>e;h--);d=d.slice(f,h)}return d};a.tickFormat=function(){return function(e){return e.toPrecision(1)}};
+return a};Z.pow=function(a){return Math.pow(10,a)};$.pow=function(a){return-Math.pow(10,-a)};d3.scale.pow=function(){function a(f){return b(e(f))}var b=d3.scale.linear(),c=d3.scale.linear(),g=1,e=Number,d=e;a.invert=function(f){return d(b.invert(f))};a.domain=function(f){if(!arguments.length)return b.domain().map(d);var h=(f[0]||f[1])<0?Oa:Na;e=h(g);d=h(1/g);b.domain(f.map(e));c.domain(f);return a};a.range=d3.rebind(a,b.range);a.rangeRound=d3.rebind(a,b.rangeRound);a.interpolate=d3.rebind(a,b.interpolate);
a.ticks=c.ticks;a.tickFormat=c.tickFormat;a.exponent=function(f){if(!arguments.length)return g;var h=a.domain();g=f;return a.domain(h)};return a};d3.scale.sqrt=function(){return d3.scale.pow().exponent(0.5)};d3.scale.ordinal=function(){function a(d){d=d in c?c[d]:c[d]=b.push(d)-1;return g[d%g.length]}var b=[],c={},g=[],e=0;a.domain=function(d){if(!arguments.length)return b;b=d;c={};for(var f=-1,h=-1,i=b.length;++f<i;){d=b[f];d in c||(c[d]=++h)}return a};a.range=function(d){if(!arguments.length)return g;
g=d;return a};a.rangePoints=function(d,f){if(arguments.length<2)f=0;var h=d[0],i=d[1],k=(i-h)/(b.length-1+f);g=b.length==1?[(h+i)/2]:d3.range(h+k*f/2,i+k/2,k);e=0;return a};a.rangeBands=function(d,f){if(arguments.length<2)f=0;var h=d[0],i=d[1],k=(i-h)/(b.length+f);g=d3.range(h+k*f,i,k);e=k*(1-f);return a};a.rangeRoundBands=function(d,f){if(arguments.length<2)f=0;var h=d[0],i=d[1],k=i-h,j=Math.floor(k/(b.length+f));g=d3.range(h+Math.round((k-(b.length-f)*j)/2),i,j);e=Math.round(j*(1-f));return a};
-a.rangeBand=function(){return e};return a};d3.scale.category10=function(){return d3.scale.ordinal().range(eb)};d3.scale.category20=function(){return d3.scale.ordinal().range(fb)};d3.scale.category20b=function(){return d3.scale.ordinal().range(gb)};d3.scale.category20c=function(){return d3.scale.ordinal().range(hb)};var eb=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],fb=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896",
-"#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],gb=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],hb=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696",
+a.rangeBand=function(){return e};return a};d3.scale.category10=function(){return d3.scale.ordinal().range(db)};d3.scale.category20=function(){return d3.scale.ordinal().range(eb)};d3.scale.category20b=function(){return d3.scale.ordinal().range(fb)};d3.scale.category20c=function(){return d3.scale.ordinal().range(gb)};var db=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],eb=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896",
+"#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],fb=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],gb=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696",
"#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){function a(){for(var f=-1,h=d.length=e.length,i=g.length/h;++f<h;)d[f]=g[~~(f*i)]}function b(f){if(isNaN(f=+f))return NaN;for(var h=0,i=d.length-1;h<=i;){var k=h+i>>1,j=d[k];if(j<f)h=k+1;else if(j>f)i=k-1;else return k}return i<0?0:i}function c(f){return e[b(f)]}var g=[],e=[],d=[];c.domain=function(f){if(!arguments.length)return g;g=f.filter(function(h){return!isNaN(h)}).sort(d3.ascending);a();return c};c.range=function(f){if(!arguments.length)return e;
e=f;a();return c};c.quantiles=function(){return d};return c};d3.scale.quantize=function(){function a(f){return d[Math.max(0,Math.min(e,Math.floor(g*(f-b))))]}var b=0,c=1,g=2,e=1,d=[0,1];a.domain=function(f){if(!arguments.length)return[b,c];b=f[0];c=f[1];g=d.length/(c-b);return a};a.range=function(f){if(!arguments.length)return d;d=f;g=d.length/(c-b);e=d.length-1;return a};return a};d3.svg={};d3.svg.arc=function(){function a(){var d=b.apply(this,arguments),f=c.apply(this,arguments),h=g.apply(this,
-arguments)+I,i=e.apply(this,arguments)+I,k=i-h,j=k<Math.PI?"0":"1",p=Math.cos(h);h=Math.sin(h);var q=Math.cos(i);i=Math.sin(i);return k>=ib?d?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+d+"A"+d+","+d+" 0 1,1 0,"+-d+"A"+d+","+d+" 0 1,1 0,"+d+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":d?"M"+f*p+","+f*h+"A"+f+","+f+" 0 "+j+",1 "+f*q+","+f*i+"L"+d*q+","+d*i+"A"+d+","+d+" 0 "+j+",0 "+d*p+","+d*h+"Z":"M"+f*p+","+f*h+"A"+f+","+f+" 0 "+j+",1 "+f*q+","+f*i+
-"L0,0Z"}var b=Qa,c=Ra,g=pa,e=qa;a.innerRadius=function(d){if(!arguments.length)return b;b=w(d);return a};a.outerRadius=function(d){if(!arguments.length)return c;c=w(d);return a};a.startAngle=function(d){if(!arguments.length)return g;g=w(d);return a};a.endAngle=function(d){if(!arguments.length)return e;e=w(d);return a};a.centroid=function(){var d=(b.apply(this,arguments)+c.apply(this,arguments))/2,f=(g.apply(this,arguments)+e.apply(this,arguments))/2+I;return[Math.cos(f)*d,Math.sin(f)*d]};return a};
-var I=-Math.PI/2,ib=2*Math.PI-1.0E-6;d3.svg.line=function(){function a(f){return f.length<1?null:"M"+e(aa(this,f,b,c),d)}var b=ra,c=sa,g="linear",e=P[g],d=0.7;a.x=function(f){if(!arguments.length)return b;b=f;return a};a.y=function(f){if(!arguments.length)return c;c=f;return a};a.interpolate=function(f){if(!arguments.length)return g;e=P[g=f];return a};a.tension=function(f){if(!arguments.length)return d;d=f;return a};return a};var P={linear:H,"step-before":function(a){var b=[],c=0,g=a.length,e=a[0];
-for(b.push(e[0],",",e[1]);++c<g;)b.push("V",(e=a[c])[1],"H",e[0]);return b.join("")},"step-after":function(a){var b=[],c=0,g=a.length,e=a[0];for(b.push(e[0],",",e[1]);++c<g;)b.push("H",(e=a[c])[0],"V",e[1]);return b.join("")},basis:function(a){if(a.length<3)return H(a);var b=[],c=1,g=a.length,e=a[0],d=e[0],f=e[1],h=[d,d,d,(e=a[1])[0]],i=[f,f,f,e[1]];b.push(d,",",f);for(L(b,h,i);++c<g;){e=a[c];h.shift();h.push(e[0]);i.shift();i.push(e[1]);L(b,h,i)}for(c=-1;++c<2;){h.shift();h.push(e[0]);i.shift();
-i.push(e[1]);L(b,h,i)}return b.join("")},"basis-closed":function(a){for(var b,c=-1,g=a.length,e=g+4,d,f=[],h=[];++c<4;){d=a[c%g];f.push(d[0]);h.push(d[1])}b=[C(M,f),",",C(M,h)];for(--c;++c<e;){d=a[c%g];f.shift();f.push(d[0]);h.shift();h.push(d[1]);L(b,f,h)}return b.join("")},cardinal:function(a,b){return a.length<3?H(a):a[0]+ta(a,ua(a,b))},"cardinal-closed":function(a,b){return a.length<3?H(a):a[0]+ta(a,ua([a[a.length-2]].concat(a,[a[1]]),b))}},va=[0,2/3,1/3,0],wa=[0,1/3,2/3,0],M=[0,1/6,2/3,1/6];
-d3.svg.area=function(){function a(h){return h.length<1?null:"M"+d(aa(this,h,b,g),f)+"L"+d(aa(this,h,b,c).reverse(),f)+"Z"}var b=ra,c=Sa,g=sa,e="linear",d=P[e],f=0.7;a.x=function(h){if(!arguments.length)return b;b=h;return a};a.y0=function(h){if(!arguments.length)return c;c=h;return a};a.y1=function(h){if(!arguments.length)return g;g=h;return a};a.interpolate=function(h){if(!arguments.length)return e;d=P[e=h];return a};a.tension=function(h){if(!arguments.length)return f;f=h;return a};return a};d3.svg.chord=
-function(){function a(h,i){var k=b(this,c,h,i),j=b(this,g,h,i);return"M"+k.p0+("A"+k.r+","+k.r+" 0 0,1 "+k.p1)+(k.a0==j.a0&&k.a1==j.a1?"Q 0,0 "+k.p0:"Q 0,0 "+j.p0+("A"+j.r+","+j.r+" 0 0,1 "+j.p1)+("Q 0,0 "+k.p0))+"Z"}function b(h,i,k,j){var p=i.call(h,k,j);i=e.call(h,p,j);k=d.call(h,p,j)+I;h=f.call(h,p,j)+I;return{r:i,a0:k,a1:h,p0:[i*Math.cos(k),i*Math.sin(k)],p1:[i*Math.cos(h),i*Math.sin(h)]}}var c=Ta,g=Ua,e=Va,d=pa,f=qa;a.radius=function(h){if(!arguments.length)return e;e=w(h);return a};a.source=
-function(h){if(!arguments.length)return c;c=w(h);return a};a.target=function(h){if(!arguments.length)return g;g=w(h);return a};a.startAngle=function(h){if(!arguments.length)return d;d=w(h);return a};a.endAngle=function(h){if(!arguments.length)return f;f=w(h);return a};return a};d3.svg.mouse=function(a){var b=(a.ownerSVGElement||a).createSVGPoint();if(da<0&&(window.scrollX||window.scrollY)){var c=d3.select(document.body).append("svg:svg").style("position","absolute").style("top",0).style("left",0),
-g=c[0][0].getScreenCTM();da=!(g.f||g.e);c.remove()}if(da){b.x=d3.event.pageX;b.y=d3.event.pageY}else{b.x=d3.event.clientX;b.y=d3.event.clientY}b=b.matrixTransform(a.getScreenCTM().inverse());return[b.x,b.y]};var da=/WebKit/.test(navigator.userAgent)?-1:0;d3.svg.symbol=function(){function a(g,e){return(xa[b.call(this,g,e)]||xa.circle)(c.call(this,g,e))}var b=Xa,c=Wa;a.type=function(g){if(!arguments.length)return b;b=w(g);return a};a.size=function(g){if(!arguments.length)return c;c=w(g);return a};return a};
-d3.svg.symbolTypes=["circle","cross","diamond","square","triangle-down","triangle-up"];var xa={circle:function(a){a=Math.sqrt(a/Math.PI);return"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"Z"},cross:function(a){a=Math.sqrt(a/5)/2;return"M"+-3*a+","+-a+"H"+-a+"V"+-3*a+"H"+a+"V"+-a+"H"+3*a+"V"+a+"H"+a+"V"+3*a+"H"+-a+"V"+a+"H"+-3*a+"Z"},diamond:function(a){a=Math.sqrt(a/(2*ya));var b=a*ya;return"M0,"+-a+"L"+b+",0 0,"+a+" "+-b+",0Z"},square:function(a){a=Math.sqrt(a)/2;return"M"+-a+","+
--a+"L"+a+","+-a+" "+a+","+a+" "+-a+","+a+"Z"},"triangle-down":function(a){a=Math.sqrt(a/Q);var b=a*Q/2;return"M0,"+b+"L"+a+","+-b+" "+-a+","+-b+"Z"},"triangle-up":function(a){a=Math.sqrt(a/Q);var b=a*Q/2;return"M0,"+-b+"L"+a+","+b+" "+-a+","+b+"Z"}},Q=Math.sqrt(3),ya=Math.tan(30*Math.PI/180)})();
+arguments)+H,i=e.apply(this,arguments)+H,k=i-h,j=k<Math.PI?"0":"1",o=Math.cos(h);h=Math.sin(h);var p=Math.cos(i);i=Math.sin(i);return k>=hb?d?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+d+"A"+d+","+d+" 0 1,1 0,"+-d+"A"+d+","+d+" 0 1,1 0,"+d+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+-f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":d?"M"+f*o+","+f*h+"A"+f+","+f+" 0 "+j+",1 "+f*p+","+f*i+"L"+d*p+","+d*i+"A"+d+","+d+" 0 "+j+",0 "+d*o+","+d*h+"Z":"M"+f*o+","+f*h+"A"+f+","+f+" 0 "+j+",1 "+f*p+","+f*i+
+"L0,0Z"}var b=Pa,c=Qa,g=oa,e=pa;a.innerRadius=function(d){if(!arguments.length)return b;b=v(d);return a};a.outerRadius=function(d){if(!arguments.length)return c;c=v(d);return a};a.startAngle=function(d){if(!arguments.length)return g;g=v(d);return a};a.endAngle=function(d){if(!arguments.length)return e;e=v(d);return a};a.centroid=function(){var d=(b.apply(this,arguments)+c.apply(this,arguments))/2,f=(g.apply(this,arguments)+e.apply(this,arguments))/2+H;return[Math.cos(f)*d,Math.sin(f)*d]};return a};
+var H=-Math.PI/2,hb=2*Math.PI-1.0E-6;d3.svg.line=function(){function a(f){return f.length<1?null:"M"+e(aa(this,f,b,c),d)}var b=qa,c=ra,g="linear",e=O[g],d=0.7;a.x=function(f){if(!arguments.length)return b;b=f;return a};a.y=function(f){if(!arguments.length)return c;c=f;return a};a.interpolate=function(f){if(!arguments.length)return g;e=O[g=f];return a};a.tension=function(f){if(!arguments.length)return d;d=f;return a};return a};var O={linear:G,"step-before":function(a){var b=[],c=0,g=a.length,e=a[0];
+for(b.push(e[0],",",e[1]);++c<g;)b.push("V",(e=a[c])[1],"H",e[0]);return b.join("")},"step-after":function(a){var b=[],c=0,g=a.length,e=a[0];for(b.push(e[0],",",e[1]);++c<g;)b.push("H",(e=a[c])[0],"V",e[1]);return b.join("")},basis:function(a){if(a.length<3)return G(a);var b=[],c=1,g=a.length,e=a[0],d=e[0],f=e[1],h=[d,d,d,(e=a[1])[0]],i=[f,f,f,e[1]];b.push(d,",",f);for(K(b,h,i);++c<g;){e=a[c];h.shift();h.push(e[0]);i.shift();i.push(e[1]);K(b,h,i)}for(c=-1;++c<2;){h.shift();h.push(e[0]);i.shift();
+i.push(e[1]);K(b,h,i)}return b.join("")},"basis-closed":function(a){for(var b,c=-1,g=a.length,e=g+4,d,f=[],h=[];++c<4;){d=a[c%g];f.push(d[0]);h.push(d[1])}b=[B(L,f),",",B(L,h)];for(--c;++c<e;){d=a[c%g];f.shift();f.push(d[0]);h.shift();h.push(d[1]);K(b,f,h)}return b.join("")},cardinal:function(a,b){return a.length<3?G(a):a[0]+sa(a,ta(a,b))},"cardinal-closed":function(a,b){return a.length<3?G(a):a[0]+sa(a,ta([a[a.length-2]].concat(a,[a[1]]),b))}},ua=[0,2/3,1/3,0],va=[0,1/3,2/3,0],L=[0,1/6,2/3,1/6];
+d3.svg.area=function(){function a(h){return h.length<1?null:"M"+d(aa(this,h,b,g),f)+"L"+d(aa(this,h,b,c).reverse(),f)+"Z"}var b=qa,c=Ra,g=ra,e="linear",d=O[e],f=0.7;a.x=function(h){if(!arguments.length)return b;b=h;return a};a.y0=function(h){if(!arguments.length)return c;c=h;return a};a.y1=function(h){if(!arguments.length)return g;g=h;return a};a.interpolate=function(h){if(!arguments.length)return e;d=O[e=h];return a};a.tension=function(h){if(!arguments.length)return f;f=h;return a};return a};d3.svg.chord=
+function(){function a(h,i){var k=b(this,c,h,i),j=b(this,g,h,i);return"M"+k.p0+("A"+k.r+","+k.r+" 0 0,1 "+k.p1)+(k.a0==j.a0&&k.a1==j.a1?"Q 0,0 "+k.p0:"Q 0,0 "+j.p0+("A"+j.r+","+j.r+" 0 0,1 "+j.p1)+("Q 0,0 "+k.p0))+"Z"}function b(h,i,k,j){var o=i.call(h,k,j);i=e.call(h,o,j);k=d.call(h,o,j)+H;h=f.call(h,o,j)+H;return{r:i,a0:k,a1:h,p0:[i*Math.cos(k),i*Math.sin(k)],p1:[i*Math.cos(h),i*Math.sin(h)]}}var c=Sa,g=Ta,e=Ua,d=oa,f=pa;a.radius=function(h){if(!arguments.length)return e;e=v(h);return a};a.source=
+function(h){if(!arguments.length)return c;c=v(h);return a};a.target=function(h){if(!arguments.length)return g;g=v(h);return a};a.startAngle=function(h){if(!arguments.length)return d;d=v(h);return a};a.endAngle=function(h){if(!arguments.length)return f;f=v(h);return a};return a};d3.svg.mouse=function(a){var b=(a.ownerSVGElement||a).createSVGPoint();if(da<0&&(window.scrollX||window.scrollY)){var c=d3.select(document.body).append("svg:svg").style("position","absolute").style("top",0).style("left",0),
+g=c[0][0].getScreenCTM();da=!(g.f||g.e);c.remove()}if(da){b.x=d3.event.pageX;b.y=d3.event.pageY}else{b.x=d3.event.clientX;b.y=d3.event.clientY}b=b.matrixTransform(a.getScreenCTM().inverse());return[b.x,b.y]};var da=/WebKit/.test(navigator.userAgent)?-1:0;d3.svg.symbol=function(){function a(g,e){return(wa[b.call(this,g,e)]||wa.circle)(c.call(this,g,e))}var b=Wa,c=Va;a.type=function(g){if(!arguments.length)return b;b=v(g);return a};a.size=function(g){if(!arguments.length)return c;c=v(g);return a};return a};
+d3.svg.symbolTypes=["circle","cross","diamond","square","triangle-down","triangle-up"];var wa={circle:function(a){a=Math.sqrt(a/Math.PI);return"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"Z"},cross:function(a){a=Math.sqrt(a/5)/2;return"M"+-3*a+","+-a+"H"+-a+"V"+-3*a+"H"+a+"V"+-a+"H"+3*a+"V"+a+"H"+a+"V"+3*a+"H"+-a+"V"+a+"H"+-3*a+"Z"},diamond:function(a){a=Math.sqrt(a/(2*xa));var b=a*xa;return"M0,"+-a+"L"+b+",0 0,"+a+" "+-b+",0Z"},square:function(a){a=Math.sqrt(a)/2;return"M"+-a+","+
+-a+"L"+a+","+-a+" "+a+","+a+" "+-a+","+a+"Z"},"triangle-down":function(a){a=Math.sqrt(a/P);var b=a*P/2;return"M0,"+b+"L"+a+","+-b+" "+-a+","+-b+"Z"},"triangle-up":function(a){a=Math.sqrt(a/P);var b=a*P/2;return"M0,"+-b+"L"+a+","+b+" "+-a+","+b+"Z"}},P=Math.sqrt(3),xa=Math.tan(30*Math.PI/180)})();
View
2  src/core/core.js
@@ -1 +1 @@
-d3 = {version: "1.8.3"}; // semver
+d3 = {version: "1.8.4"}; // semver
View
2  src/scale/log.js
@@ -31,7 +31,7 @@ d3.scale.log = function() {
j = Math.ceil(d[1]),
u = pow(d[0]),
v = pow(d[1]);
- if (n) {
+ if (log === d3_scale_logn) {
ticks.push(pow(i));
for (; i++ < j;) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
} else {
View
8 tests/test-scale-linear.js
@@ -70,3 +70,11 @@ console.log(" Date -> ", x.range([new Date(1990, 0, 1), new Date(1991,
console.log(" Number -> ", x.range([new Number(0), new Number(42)]).invert(new Number(21)));
console.log(" ??? -> ", x.range(["#000", "#fff"]).invert("#999")); // can't be coerced
console.log("");
+
+var x = d3.scale.linear();
+console.log("ticks:");
+console.log(" 1 -> ", x.ticks(1).map(x.tickFormat(1)).join(", "));
+console.log(" 2 -> ", x.ticks(2).map(x.tickFormat(2)).join(", "));
+console.log(" 5 -> ", x.ticks(5).map(x.tickFormat(5)).join(", "));
+console.log(" 10 -> ", x.ticks(10).map(x.tickFormat(10)).join(", "));
+console.log("");
View
6 tests/test-scale-linear.out
@@ -50,3 +50,9 @@ range coercion, invert:
Number -> 0.5
??? -> NaN
+ticks:
+ 1 -> 0, 1
+ 2 -> 0.0, 0.5, 1.0
+ 5 -> 0.0, 0.2, 0.4, 0.6, 0.8, 1.0
+ 10 -> 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
+
View
8 tests/test-scale-log.js
@@ -67,3 +67,11 @@ console.log(" 1 -> ", x(1));
console.log(" 5 -> ", x(5));
console.log(" 10 -> ", x(10));
console.log("");
+
+var x = d3.scale.log(), f = x.tickFormat();
+console.log("ticks:");
+console.log(" [.1, 10] -> ", x.ticks().map(f).join(", "));
+console.log(" [.1, 100] -> ", x.domain([.1, 100]).ticks().map(f).join(", "));
+console.log(" [1, 100] -> ", x.domain([1, 100]).ticks().map(f).join(", "));
+console.log(" [-100, -1] -> ", x.domain([-100, -1]).ticks().map(f).join(", "));
+console.log("");
View
6 tests/test-scale-log.out
@@ -49,3 +49,9 @@ domain([.1, 10]).range(["red", "blue"]).interpolate(hsl):
5 -> #009aff
10 -> #0000ff
+ticks:
+ [.1, 10] -> 1, 2, 3, 4, 5, 6, 7, 8, 9, 1e+1
+ [.1, 100] -> 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1e+1, 2e+1, 3e+1, 4e+1, 5e+1, 6e+1, 7e+1, 8e+1, 9e+1, 1e+2
+ [1, 100] -> 1, 2, 3, 4, 5, 6, 7, 8, 9, 1e+1, 2e+1, 3e+1, 4e+1, 5e+1, 6e+1, 7e+1, 8e+1, 9e+1, 1e+2
+ [-100, -1] -> -1e+2, -9e+1, -8e+1, -7e+1, -6e+1, -5e+1, -4e+1, -3e+1, -2e+1, -1e+1, -9, -8, -7, -6, -5, -4, -3, -2, -1
+
Please sign in to comment.
Something went wrong with that request. Please try again.