@@ -2184,9 +2184,7 @@ axes.drawOne = function(gd, ax, opts) {
2184
2184
labelFns : axes . makeLabelFns ( ax , mainLinePosition )
2185
2185
} ;
2186
2186
2187
- if ( ax . _anchorAxis ) {
2188
- opts . grid = plotinfo . gridlayer . select ( '.' + ax . _anchorAxis . _id ) ;
2189
- }
2187
+ opts . grid = plotinfo . gridlayer . select ( '.' + ax . _id ) ;
2190
2188
2191
2189
return axes . drawLabels ( gd , ax , opts ) ;
2192
2190
} ) ;
@@ -3047,9 +3045,8 @@ axes.drawLabels = function(gd, ax, opts) {
3047
3045
} ) ;
3048
3046
}
3049
3047
3050
- ax . _hideOutOfRangeInsideTickLabels = undefined ;
3051
- if ( ( ax . ticklabelposition || '' ) . indexOf ( 'inside' ) !== - 1 ) {
3052
- ax . _hideOutOfRangeInsideTickLabels = function ( ) {
3048
+ ax . _hideOutOfRangeInsideTickLabels = function ( ) {
3049
+ if ( ( ax . ticklabelposition || '' ) . indexOf ( 'inside' ) !== - 1 ) {
3053
3050
var rl = Lib . simpleMap ( ax . range , ax . r2l ) ;
3054
3051
3055
3052
// hide inside tick labels that go outside axis end points
@@ -3087,24 +3084,30 @@ axes.drawLabels = function(gd, ax, opts) {
3087
3084
} // TODO: hide mathjax?
3088
3085
} ) ;
3089
3086
3090
- var anchorAx = ax . _anchorAxis || { } ;
3091
-
3092
- if ( ( anchorAx . ticklabelposition || '' ) . indexOf ( 'inside' ) !== - 1 ) {
3093
- var grid = opts . grid ;
3094
- if ( grid ) {
3095
- grid . each ( function ( ) {
3096
- d3 . select ( this ) . selectAll ( 'path' ) . each ( function ( d ) {
3097
- var q = anchorAx . l2p ( d . x ) + anchorAx . _offset ;
3087
+ if ( ax . _anchorAxis ) {
3088
+ ax . _anchorAxis . _visibleLabelMin = visibleLabelMin ;
3089
+ ax . _anchorAxis . _visibleLabelMax = visibleLabelMax ;
3090
+ }
3091
+ }
3092
+ } ;
3098
3093
3099
- if ( q < visibleLabelMax && q > visibleLabelMin ) {
3100
- d3 . select ( this ) . style ( { opacity : 0 } ) ;
3101
- }
3102
- } ) ;
3094
+ ax . _hideCounterAxisInsideTickLabels = function ( ) {
3095
+ var anchorAx = ax . _anchorAxis || { } ;
3096
+ if ( ( anchorAx . ticklabelposition || '' ) . indexOf ( 'inside' ) !== - 1 ) {
3097
+ var grid = opts . grid ;
3098
+ if ( grid ) {
3099
+ grid . each ( function ( ) {
3100
+ d3 . select ( this ) . selectAll ( 'path' ) . each ( function ( d ) {
3101
+ var q = ax . l2p ( d . x ) + ax . _offset ;
3102
+
3103
+ if ( q < ax . _visibleLabelMax && q > ax . _visibleLabelMin ) {
3104
+ d3 . select ( this ) . style ( { opacity : 0 } ) ;
3105
+ }
3103
3106
} ) ;
3104
- }
3107
+ } ) ;
3105
3108
}
3106
- } ;
3107
- }
3109
+ }
3110
+ } ;
3108
3111
3109
3112
// make sure all labels are correctly positioned at their base angle
3110
3113
// the positionLabels call above is only for newly drawn labels.
0 commit comments