File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -630,12 +630,14 @@ axes.calcTicks = function calcTicks(ax, opts) {
630630 generateTicks ( ) ;
631631
632632 var isPeriod = ax . ticklabelmode === 'period' ;
633- if ( isPeriod ) {
633+ var addedPreTick0Label = false ;
634+ if ( isPeriod && tickVals [ 0 ] ) {
634635 // add one label to show pre tick0 period
635636 tickVals . unshift ( {
636637 minor : false ,
637638 value : axes . tickIncrement ( tickVals [ 0 ] . value , ax . dtick , ! axrev , ax . caldendar )
638639 } ) ;
640+ addedPreTick0Label = true ;
639641 }
640642
641643 if ( ax . rangebreaks ) {
@@ -778,7 +780,7 @@ axes.calcTicks = function calcTicks(ax, opts) {
778780 ticksOut . push ( t ) ;
779781 }
780782
781- if ( isPeriod ) {
783+ if ( isPeriod && addedPreTick0Label ) {
782784 var removedPreTick0Label = false ;
783785
784786 for ( i = 0 ; i < ticksOut . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments