1010 d3_style_setProperty . call ( this , name , value + "" , priority ) ;
1111 } ;
1212}
13- d3 = { version : "2.7.0 " } ; // semver
13+ d3 = { version : "2.7.1 " } ; // semver
1414var d3_array = d3_arraySlice ; // conversion for NodeLists
1515
1616function d3_arrayCopy ( pseudoarray ) {
@@ -424,9 +424,10 @@ d3.round = function(x, n) {
424424} ;
425425d3 . xhr = function ( url , mime , callback ) {
426426 var req = new XMLHttpRequest ;
427- if ( arguments . length < 3 ) callback = mime ;
427+ if ( arguments . length < 3 ) callback = mime , mime = null ;
428428 else if ( mime && req . overrideMimeType ) req . overrideMimeType ( mime ) ;
429429 req . open ( "GET" , url , true ) ;
430+ if ( mime ) req . setRequestHeader ( "Accept" , mime ) ;
430431 req . onreadystatechange = function ( ) {
431432 if ( req . readyState === 4 ) callback ( req . status < 300 ? req : null ) ;
432433 } ;
@@ -1574,16 +1575,18 @@ d3_selectionPrototype.property = function(name, value) {
15741575 ? propertyFunction : propertyConstant ) ) ;
15751576} ;
15761577d3_selectionPrototype . text = function ( value ) {
1577- return arguments . length < 1 ? this . node ( ) . textContent
1578- : ( this . each ( typeof value === "function"
1579- ? function ( ) { this . textContent = value . apply ( this , arguments ) ; }
1580- : function ( ) { this . textContent = value ; } ) ) ;
1578+ return arguments . length < 1
1579+ ? this . node ( ) . textContent : this . each ( typeof value === "function"
1580+ ? function ( ) { var v = value . apply ( this , arguments ) ; this . textContent = v == null ? "" : v ; } : value == null
1581+ ? function ( ) { this . textContent = "" ; }
1582+ : function ( ) { this . textContent = value ; } ) ;
15811583} ;
15821584d3_selectionPrototype . html = function ( value ) {
1583- return arguments . length < 1 ? this . node ( ) . innerHTML
1584- : ( this . each ( typeof value === "function"
1585- ? function ( ) { this . innerHTML = value . apply ( this , arguments ) ; }
1586- : function ( ) { this . innerHTML = value ; } ) ) ;
1585+ return arguments . length < 1
1586+ ? this . node ( ) . innerHTML : this . each ( typeof value === "function"
1587+ ? function ( ) { var v = value . apply ( this , arguments ) ; this . innerHTML = v == null ? "" : v ; } : value == null
1588+ ? function ( ) { this . innerHTML = "" ; }
1589+ : function ( ) { this . innerHTML = value ; } ) ;
15871590} ;
15881591// TODO append(node)?
15891592// TODO append(function)?
@@ -2276,9 +2279,13 @@ var d3_timer_frame = window.requestAnimationFrame
22762279 || window . msRequestAnimationFrame
22772280 || function ( callback ) { setTimeout ( callback , 17 ) ; } ;
22782281d3 . transform = function ( string ) {
2279- d3_transformG . setAttribute ( "transform" , string ) ;
2280- var t = d3_transformG . transform . baseVal . consolidate ( ) ;
2281- return new d3_transform ( t ? t . matrix : d3_transformIdentity ) ;
2282+ var g = document . createElementNS ( d3 . ns . prefix . svg , "g" ) ,
2283+ identity = { a : 1 , b : 0 , c : 0 , d : 1 , e : 0 , f : 0 } ;
2284+ return ( d3 . transform = function ( string ) {
2285+ g . setAttribute ( "transform" , string ) ;
2286+ var t = g . transform . baseVal . consolidate ( ) ;
2287+ return new d3_transform ( t ? t . matrix : identity ) ;
2288+ } ) ( string ) ;
22822289} ;
22832290
22842291// Compute x-scale and normalize the first row.
@@ -2330,9 +2337,7 @@ function d3_transformCombine(a, b, k) {
23302337 return a ;
23312338}
23322339
2333- var d3_transformG = document . createElementNS ( d3 . ns . prefix . svg , "g" ) ,
2334- d3_transformIdentity = { a : 1 , b : 0 , c : 0 , d : 1 , e : 0 , f : 0 } ,
2335- d3_transformDegrees = 180 / Math . PI ;
2340+ var d3_transformDegrees = 180 / Math . PI ;
23362341function d3_noop ( ) { }
23372342d3 . scale = { } ;
23382343
@@ -2716,7 +2721,7 @@ function d3_scale_ordinal(domain, ranger) {
27162721 } ;
27172722
27182723 scale . rangeExtent = function ( ) {
2719- return ranger . x ;
2724+ return ranger . t === "range" ? d3_scaleExtent ( ranger . x ) : ranger . x ;
27202725 } ;
27212726
27222727 scale . copy = function ( ) {
@@ -3503,10 +3508,10 @@ d3.svg.chord = function() {
35033508 var s = subgroup ( this , source , d , i ) ,
35043509 t = subgroup ( this , target , d , i ) ;
35053510 return "M" + s . p0
3506- + arc ( s . r , s . p1 ) + ( equals ( s , t )
3511+ + arc ( s . r , s . p1 , s . a1 - s . a0 ) + ( equals ( s , t )
35073512 ? curve ( s . r , s . p1 , s . r , s . p0 )
35083513 : curve ( s . r , s . p1 , t . r , t . p0 )
3509- + arc ( t . r , t . p1 )
3514+ + arc ( t . r , t . p1 , t . a1 - t . a0 )
35103515 + curve ( t . r , t . p1 , s . r , s . p0 ) )
35113516 + "Z" ;
35123517 }
@@ -3529,8 +3534,8 @@ d3.svg.chord = function() {
35293534 return a . a0 == b . a0 && a . a1 == b . a1 ;
35303535 }
35313536
3532- function arc ( r , p ) {
3533- return "A" + r + "," + r + " 0 0 ,1 " + p ;
3537+ function arc ( r , p , a ) {
3538+ return "A" + r + "," + r + " 0 " + + ( a > Math . PI ) + " ,1 " + p ;
35343539 }
35353540
35363541 function curve ( r0 , p0 , r1 , p1 ) {
0 commit comments