Skip to content

Commit d0fd7c4

Browse files
committed
fixup period labels and tick visiblity
1 parent a7fc3c3 commit d0fd7c4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/plots/cartesian/axes.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -2809,10 +2809,7 @@ axes.drawTicks = function(gd, ax, opts) {
28092809
.classed('crisp', opts.crisp !== false)
28102810
.call(Color.stroke, ax.tickcolor)
28112811
.style('stroke-width', Drawing.crispRound(gd, ax.tickwidth, 1) + 'px')
2812-
.attr('d', opts.path)
2813-
.style(VISIBLE);
2814-
2815-
hideCounterAxisInsideTickLabels(ax, [TICK_PATH]);
2812+
.attr('d', opts.path);
28162813

28172814
ticks.attr('transform', opts.transFn);
28182815
};
@@ -3115,6 +3112,9 @@ axes.drawLabels = function(gd, ax, opts) {
31153112
TICK_PATH,
31163113
TICK_TEXT
31173114
]).forEach(function(e) {
3115+
var isTickText = e.K === 'tick' && e.L === 'text';
3116+
if(isTickText && ax.ticklabelmode === 'period') return;
3117+
31183118
var sel;
31193119
if(e.K === 'gridline') sel = opts.plotinfo.gridlayer;
31203120
else if(e.K === 'zeroline') sel = opts.plotinfo.zerolinelayer;
@@ -3127,6 +3127,8 @@ axes.drawLabels = function(gd, ax, opts) {
31273127
var t = d3.select(this);
31283128
if(q < ax._visibleLabelMax && q > ax._visibleLabelMin) {
31293129
t.style(HIDDEN);
3130+
} else if(e.K === 'tick' && e.L === 'path') {
3131+
t.style(VISIBLE);
31303132
}
31313133
});
31323134
});

0 commit comments

Comments
 (0)