File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -945,6 +945,11 @@ axes.calcTicks = function calcTicks(ax, opts) {
945945 ax . _inCalcTicks = true ;
946946
947947 var lastVisibleHead ;
948+ var hideLabe = function ( tick ) {
949+ tick . text = ' ' ; // don't use an empty string here which can confuse automargin (issue 5132)
950+ ax . _prevDateHead = lastVisibleHead ;
951+ } ;
952+
948953 var ticksOut = [ ] ;
949954 var t , p ;
950955 for ( i = 0 ; i < tickVals . length ; i ++ ) {
@@ -967,14 +972,12 @@ axes.calcTicks = function calcTicks(ax, opts) {
967972 if ( p > maxRange ) t . periodX = maxRange ;
968973 if ( p < minRange ) t . periodX = minRange ;
969974
970- t . text = ' ' ; // don't use an empty string here which can confuse automargin (issue 5132)
971- ax . _prevDateHead = lastVisibleHead ;
975+ hideLabe ( t ) ;
972976 }
973977 }
974978
975979 if ( tickVals [ i ] . skipLabel ) {
976- t . text = ' ' ;
977- ax . _prevDateHead = lastVisibleHead ;
980+ hideLabe ( t ) ;
978981 }
979982
980983 ticksOut . push ( t ) ;
You can’t perform that action at this time.
0 commit comments