@@ -38,7 +38,6 @@ var VISIBLE = { visibility: 'visible' };
3838var HIDDEN = { visibility : 'hidden' } ;
3939
4040var GRID_PATH = { K : 'gridline' , L : 'path' } ;
41- var ZERO_PATH = { K : 'zeroline' , L : 'path' } ;
4241var TICK_PATH = { K : 'tick' , L : 'path' } ;
4342var TICK_TEXT = { K : 'tick' , L : 'text' } ;
4443
@@ -2185,15 +2184,13 @@ axes.drawOne = function(gd, ax, opts) {
21852184 // TODO: mirror labels, esp for subplots
21862185
21872186 seq . push ( function ( ) {
2188- var opts = {
2187+ return axes . drawLabels ( gd , ax , {
21892188 vals : vals ,
21902189 layer : mainAxLayer ,
21912190 plotinfo : plotinfo ,
21922191 transFn : transTickLabelFn ,
21932192 labelFns : axes . makeLabelFns ( ax , mainLinePosition )
2194- } ;
2195-
2196- return axes . drawLabels ( gd , ax , opts ) ;
2193+ } ) ;
21972194 } ) ;
21982195
21992196 if ( ax . type === 'multicategory' ) {
@@ -2924,10 +2921,7 @@ axes.drawZeroLine = function(gd, ax, opts) {
29242921 zl . attr ( 'transform' , opts . transFn )
29252922 . attr ( 'd' , opts . path )
29262923 . call ( Color . stroke , ax . zerolinecolor || Color . defaultLine )
2927- . style ( 'stroke-width' , Drawing . crispRound ( gd , ax . zerolinewidth , ax . _gw || 1 ) + 'px' )
2928- . style ( VISIBLE ) ;
2929-
2930- hideCounterAxisInsideTickLabels ( ax , [ ZERO_PATH ] ) ;
2924+ . style ( 'stroke-width' , Drawing . crispRound ( gd , ax . zerolinewidth , ax . _gw || 1 ) + 'px' ) ;
29312925} ;
29322926
29332927/**
@@ -3108,18 +3102,17 @@ axes.drawLabels = function(gd, ax, opts) {
31083102 if ( insideTicklabelposition ( ax . _anchorAxis || { } ) ) {
31093103 ( partialOpts || [
31103104 GRID_PATH ,
3111- ZERO_PATH ,
31123105 TICK_PATH ,
31133106 TICK_TEXT
31143107 ] ) . forEach ( function ( e ) {
31153108 var isTickText = e . K === 'tick' && e . L === 'text' ;
31163109 if ( isTickText && ax . ticklabelmode === 'period' ) return ;
31173110
31183111 var sel ;
3119- if ( e . K === 'gridline' ) sel = opts . plotinfo . gridlayer ;
3120- else if ( e . K === 'zeroline' ) sel = opts . plotinfo . zerolinelayer ;
3112+ if ( e . K === 'gridline' ) sel = opts . plotinfo . gridlayer . selectAll ( '.' + ax . _id ) ;
31213113 else sel = opts . plotinfo [ ax . _id . charAt ( 0 ) + 'axislayer' ] ;
31223114
3115+
31233116 sel . each ( function ( ) {
31243117 d3 . select ( this ) . selectAll ( e . L ) . each ( function ( d ) {
31253118 var q = ax . l2p ( d . x ) + ax . _offset ;
0 commit comments