Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'jasondavies-ie9_xhr'

  • Loading branch information...
commit f231e5c35405ea6a0ee4303b401e4eea91c7e37a 2 parents bb6f3c6 + f7cee9c
@mbostock mbostock authored
Showing with 14 additions and 14 deletions.
  1. +2 −2 d3.js
  2. +10 −10 d3.min.js
  3. +1 −1  src/core/core.js
  4. +1 −1  src/core/xhr.js
View
4 d3.js
@@ -1,4 +1,4 @@
-(function(){d3 = {version: "1.8.0"}; // semver
+(function(){d3 = {version: "1.8.1"}; // semver
if (!Date.now) Date.now = function() {
return +new Date();
};
@@ -234,7 +234,7 @@ var d3_requote_re = /[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g;
d3.xhr = function(url, mime, callback) {
var req = new XMLHttpRequest();
if (arguments.length < 3) callback = mime;
- else if (mime) req.overrideMimeType(mime);
+ else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
req.open("GET", url, true);
req.onreadystatechange = function() {
if (req.readyState == 4) callback(req.status < 300 ? req : null);
View
20 d3.min.js
@@ -25,20 +25,20 @@ a)})}function ka(a,b){var c=Date.now(),g=false,e=c+b,d=F;if(isFinite(b)){for(;d;
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.0"};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)};
+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.1"};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.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;
-if(arguments.length<3)c=b;else b&&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):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,
+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):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",
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",
View
2  src/core/core.js
@@ -1 +1 @@
-d3 = {version: "1.8.0"}; // semver
+d3 = {version: "1.8.1"}; // semver
View
2  src/core/xhr.js
@@ -1,7 +1,7 @@
d3.xhr = function(url, mime, callback) {
var req = new XMLHttpRequest();
if (arguments.length < 3) callback = mime;
- else if (mime) req.overrideMimeType(mime);
+ else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
req.open("GET", url, true);
req.onreadystatechange = function() {
if (req.readyState == 4) callback(req.status < 300 ? req : null);
Please sign in to comment.
Something went wrong with that request. Please try again.