@@ -7747,13 +7747,11 @@ d3 = function() {
77477747 }
77487748 }
77497749 d3 . svg . axis = function ( ) {
7750- var scale = d3 . scale . linear ( ) , orient = d3_svg_axisDefaultOrient , tickMajorSize = 6 , tickMinorSize = 6 , tickEndSize = 6 , tickPadding = 3 , tickArguments_ = [ 10 ] , tickValues = null , tickFormat_ , tickSubdivide = 0 ;
7750+ var scale = d3 . scale . linear ( ) , orient = d3_svg_axisDefaultOrient , tickSize = 6 , tickEndSize = 6 , tickPadding = 3 , tickArguments_ = [ 10 ] , tickValues = null , tickFormat_ ;
77517751 function axis ( g ) {
77527752 g . each ( function ( ) {
77537753 var g = d3 . select ( this ) ;
7754- var ticks = tickValues == null ? scale . ticks ? scale . ticks . apply ( scale , tickArguments_ ) : scale . domain ( ) : tickValues , tickFormat = tickFormat_ == null ? scale . tickFormat ? scale . tickFormat . apply ( scale , tickArguments_ ) : String : tickFormat_ ;
7755- var subticks = d3_svg_axisSubdivide ( scale , ticks , tickSubdivide ) , subtick = g . selectAll ( ".tick.minor" ) . data ( subticks , String ) , subtickEnter = subtick . enter ( ) . insert ( "line" , ".tick" ) . attr ( "class" , "tick minor" ) . style ( "opacity" , 1e-6 ) , subtickExit = d3 . transition ( subtick . exit ( ) ) . style ( "opacity" , 1e-6 ) . remove ( ) , subtickUpdate = d3 . transition ( subtick ) . style ( "opacity" , 1 ) ;
7756- var tick = g . selectAll ( ".tick.major" ) . data ( ticks , String ) , tickEnter = tick . enter ( ) . insert ( "g" , ".domain" ) . attr ( "class" , "tick major" ) . style ( "opacity" , 1e-6 ) , tickExit = d3 . transition ( tick . exit ( ) ) . style ( "opacity" , 1e-6 ) . remove ( ) , tickUpdate = d3 . transition ( tick ) . style ( "opacity" , 1 ) , tickTransform ;
7754+ var ticks = tickValues == null ? scale . ticks ? scale . ticks . apply ( scale , tickArguments_ ) : scale . domain ( ) : tickValues , tickFormat = tickFormat_ == null ? scale . tickFormat ? scale . tickFormat . apply ( scale , tickArguments_ ) : String : tickFormat_ , tick = g . selectAll ( ".tick.major" ) . data ( ticks , String ) , tickEnter = tick . enter ( ) . insert ( "g" , ".domain" ) . attr ( "class" , "tick major" ) . style ( "opacity" , 1e-6 ) , tickExit = d3 . transition ( tick . exit ( ) ) . style ( "opacity" , 1e-6 ) . remove ( ) , tickUpdate = d3 . transition ( tick ) . style ( "opacity" , 1 ) , tickTransform ;
77577755 var range = d3_scaleRange ( scale ) , path = g . selectAll ( ".domain" ) . data ( [ 0 ] ) , pathUpdate = ( path . enter ( ) . append ( "path" ) . attr ( "class" , "domain" ) ,
77587756 d3 . transition ( path ) ) ;
77597757 var scale1 = scale . copy ( ) , scale0 = this . __chart__ || scale1 ;
@@ -7765,12 +7763,10 @@ d3 = function() {
77657763 case "bottom" :
77667764 {
77677765 tickTransform = d3_svg_axisX ;
7768- subtickEnter . attr ( "y2" , tickMinorSize ) ;
7769- subtickUpdate . attr ( "x2" , 0 ) . attr ( "y2" , tickMinorSize ) ;
7770- lineEnter . attr ( "y2" , tickMajorSize ) ;
7771- textEnter . attr ( "y" , Math . max ( tickMajorSize , 0 ) + tickPadding ) ;
7772- lineUpdate . attr ( "x2" , 0 ) . attr ( "y2" , tickMajorSize ) ;
7773- textUpdate . attr ( "x" , 0 ) . attr ( "y" , Math . max ( tickMajorSize , 0 ) + tickPadding ) ;
7766+ lineEnter . attr ( "y2" , tickSize ) ;
7767+ textEnter . attr ( "y" , Math . max ( tickSize , 0 ) + tickPadding ) ;
7768+ lineUpdate . attr ( "x2" , 0 ) . attr ( "y2" , tickSize ) ;
7769+ textUpdate . attr ( "x" , 0 ) . attr ( "y" , Math . max ( tickSize , 0 ) + tickPadding ) ;
77747770 text . attr ( "dy" , ".71em" ) . style ( "text-anchor" , "middle" ) ;
77757771 pathUpdate . attr ( "d" , "M" + range [ 0 ] + "," + tickEndSize + "V0H" + range [ 1 ] + "V" + tickEndSize ) ;
77767772 break ;
@@ -7779,12 +7775,10 @@ d3 = function() {
77797775 case "top" :
77807776 {
77817777 tickTransform = d3_svg_axisX ;
7782- subtickEnter . attr ( "y2" , - tickMinorSize ) ;
7783- subtickUpdate . attr ( "x2" , 0 ) . attr ( "y2" , - tickMinorSize ) ;
7784- lineEnter . attr ( "y2" , - tickMajorSize ) ;
7785- textEnter . attr ( "y" , - ( Math . max ( tickMajorSize , 0 ) + tickPadding ) ) ;
7786- lineUpdate . attr ( "x2" , 0 ) . attr ( "y2" , - tickMajorSize ) ;
7787- textUpdate . attr ( "x" , 0 ) . attr ( "y" , - ( Math . max ( tickMajorSize , 0 ) + tickPadding ) ) ;
7778+ lineEnter . attr ( "y2" , - tickSize ) ;
7779+ textEnter . attr ( "y" , - ( Math . max ( tickSize , 0 ) + tickPadding ) ) ;
7780+ lineUpdate . attr ( "x2" , 0 ) . attr ( "y2" , - tickSize ) ;
7781+ textUpdate . attr ( "x" , 0 ) . attr ( "y" , - ( Math . max ( tickSize , 0 ) + tickPadding ) ) ;
77887782 text . attr ( "dy" , "0em" ) . style ( "text-anchor" , "middle" ) ;
77897783 pathUpdate . attr ( "d" , "M" + range [ 0 ] + "," + - tickEndSize + "V0H" + range [ 1 ] + "V" + - tickEndSize ) ;
77907784 break ;
@@ -7793,12 +7787,10 @@ d3 = function() {
77937787 case "left" :
77947788 {
77957789 tickTransform = d3_svg_axisY ;
7796- subtickEnter . attr ( "x2" , - tickMinorSize ) ;
7797- subtickUpdate . attr ( "x2" , - tickMinorSize ) . attr ( "y2" , 0 ) ;
7798- lineEnter . attr ( "x2" , - tickMajorSize ) ;
7799- textEnter . attr ( "x" , - ( Math . max ( tickMajorSize , 0 ) + tickPadding ) ) ;
7800- lineUpdate . attr ( "x2" , - tickMajorSize ) . attr ( "y2" , 0 ) ;
7801- textUpdate . attr ( "x" , - ( Math . max ( tickMajorSize , 0 ) + tickPadding ) ) . attr ( "y" , 0 ) ;
7790+ lineEnter . attr ( "x2" , - tickSize ) ;
7791+ textEnter . attr ( "x" , - ( Math . max ( tickSize , 0 ) + tickPadding ) ) ;
7792+ lineUpdate . attr ( "x2" , - tickSize ) . attr ( "y2" , 0 ) ;
7793+ textUpdate . attr ( "x" , - ( Math . max ( tickSize , 0 ) + tickPadding ) ) . attr ( "y" , 0 ) ;
78027794 text . attr ( "dy" , ".32em" ) . style ( "text-anchor" , "end" ) ;
78037795 pathUpdate . attr ( "d" , "M" + - tickEndSize + "," + range [ 0 ] + "H0V" + range [ 1 ] + "H" + - tickEndSize ) ;
78047796 break ;
@@ -7807,12 +7799,10 @@ d3 = function() {
78077799 case "right" :
78087800 {
78097801 tickTransform = d3_svg_axisY ;
7810- subtickEnter . attr ( "x2" , tickMinorSize ) ;
7811- subtickUpdate . attr ( "x2" , tickMinorSize ) . attr ( "y2" , 0 ) ;
7812- lineEnter . attr ( "x2" , tickMajorSize ) ;
7813- textEnter . attr ( "x" , Math . max ( tickMajorSize , 0 ) + tickPadding ) ;
7814- lineUpdate . attr ( "x2" , tickMajorSize ) . attr ( "y2" , 0 ) ;
7815- textUpdate . attr ( "x" , Math . max ( tickMajorSize , 0 ) + tickPadding ) . attr ( "y" , 0 ) ;
7802+ lineEnter . attr ( "x2" , tickSize ) ;
7803+ textEnter . attr ( "x" , Math . max ( tickSize , 0 ) + tickPadding ) ;
7804+ lineUpdate . attr ( "x2" , tickSize ) . attr ( "y2" , 0 ) ;
7805+ textUpdate . attr ( "x" , Math . max ( tickSize , 0 ) + tickPadding ) . attr ( "y" , 0 ) ;
78167806 text . attr ( "dy" , ".32em" ) . style ( "text-anchor" , "start" ) ;
78177807 pathUpdate . attr ( "d" , "M" + tickEndSize + "," + range [ 0 ] + "H0V" + range [ 1 ] + "H" + tickEndSize ) ;
78187808 break ;
@@ -7828,9 +7818,6 @@ d3 = function() {
78287818 tickEnter . call ( tickTransform , scale0 ) ;
78297819 tickUpdate . call ( tickTransform , scale1 ) ;
78307820 tickExit . call ( tickTransform , scale1 ) ;
7831- subtickEnter . call ( tickTransform , scale0 ) ;
7832- subtickUpdate . call ( tickTransform , scale1 ) ;
7833- subtickExit . call ( tickTransform , scale1 ) ;
78347821 }
78357822 } ) ;
78367823 }
@@ -7859,23 +7846,20 @@ d3 = function() {
78597846 tickFormat_ = x ;
78607847 return axis ;
78617848 } ;
7862- axis . tickSize = function ( x , y ) {
7863- if ( ! arguments . length ) return tickMajorSize ;
7864- var n = arguments . length - 1 ;
7865- tickMajorSize = + x ;
7866- tickMinorSize = n > 1 ? + y : tickMajorSize ;
7867- tickEndSize = n > 0 ? + arguments [ n ] : tickMajorSize ;
7849+ axis . tickSize = function ( x ) {
7850+ var n = arguments . length ;
7851+ if ( ! n ) return tickSize ;
7852+ tickSize = + x ;
7853+ tickEndSize = + arguments [ n - 1 ] ;
78687854 return axis ;
78697855 } ;
78707856 axis . tickPadding = function ( x ) {
78717857 if ( ! arguments . length ) return tickPadding ;
78727858 tickPadding = + x ;
78737859 return axis ;
78747860 } ;
7875- axis . tickSubdivide = function ( x ) {
7876- if ( ! arguments . length ) return tickSubdivide ;
7877- tickSubdivide = + x ;
7878- return axis ;
7861+ axis . tickSubdivide = function ( ) {
7862+ return arguments . length && axis ;
78797863 } ;
78807864 return axis ;
78817865 } ;
@@ -7895,23 +7879,6 @@ d3 = function() {
78957879 return "translate(0," + y ( d ) + ")" ;
78967880 } ) ;
78977881 }
7898- function d3_svg_axisSubdivide ( scale , ticks , m ) {
7899- subticks = [ ] ;
7900- if ( m && ticks . length > 1 ) {
7901- var extent = d3_scaleExtent ( scale . domain ( ) ) , subticks , i = - 1 , n = ticks . length , d = ( ticks [ 1 ] - ticks [ 0 ] ) / ++ m , j , v ;
7902- while ( ++ i < n ) {
7903- for ( j = m ; -- j > 0 ; ) {
7904- if ( ( v = + ticks [ i ] - j * d ) >= extent [ 0 ] ) {
7905- subticks . push ( v ) ;
7906- }
7907- }
7908- }
7909- for ( -- i , j = 0 ; ++ j < m && ( v = + ticks [ i ] + j * d ) < extent [ 1 ] ; ) {
7910- subticks . push ( v ) ;
7911- }
7912- }
7913- return subticks ;
7914- }
79157882 d3 . svg . brush = function ( ) {
79167883 var event = d3_eventDispatch ( brush , "brushstart" , "brush" , "brushend" ) , x = null , y = null , resizes = d3_svg_brushResizes [ 0 ] , extent = [ [ 0 , 0 ] , [ 0 , 0 ] ] , clamp = [ true , true ] , extentDomain ;
79177884 function brush ( g ) {
0 commit comments