Skip to content

Commit 0faf4d3

Browse files
committed
Revert "redo PR 6120"
This reverts commit 6325990.
1 parent 6325990 commit 0faf4d3

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

src/plots/cartesian/axes.js

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,7 @@ axes.prepTicks = function(ax, opts) {
674674
minPx = ax.tickfont ? Lib.bigFont(ax.tickfont.size || 12) : 15;
675675
nt = ax._length / minPx;
676676
} else {
677-
minPx = ax._id.charAt(0) === 'y' ? 40 :
678-
ax.loglabels === 'full value' ? 100 : 80;
677+
minPx = ax._id.charAt(0) === 'y' ? 40 : 80;
679678
nt = Lib.constrain(ax._length / minPx, 4, 9) + 1;
680679
}
681680

@@ -1239,10 +1238,6 @@ axes.calcTicks = function calcTicks(ax, opts) {
12391238
return text;
12401239
}
12411240

1242-
var skipText1 = /^[346789]/; // for x-axis and tick length >= 3
1243-
var skipText2 = /^[4689]/; // for tick length < 3
1244-
var logFullValue = ax.loglabels === 'full value' && ax.dtick == 'D1';
1245-
12461241
var t;
12471242
for(i = 0; i < tickVals.length; i++) {
12481243
var _minor = tickVals[i].minor;
@@ -1264,14 +1259,6 @@ axes.calcTicks = function calcTicks(ax, opts) {
12641259
hideLabel(t);
12651260
}
12661261

1267-
if(logFullValue && ax._attr && (
1268-
(ax._attr[0] === 'y' && t.text.match(skipText2)) ||
1269-
(ax._attr[0] === 'x' && t.text.length < 3 && t.text.match(skipText2)) ||
1270-
(ax._attr[0] === 'x' && t.text.length >=3 && t.text.match(skipText1))
1271-
)) {
1272-
hideLabel(t);
1273-
}
1274-
12751262
ticksOut.push(t);
12761263
}
12771264
}
@@ -1483,14 +1470,11 @@ axes.autoTicks = function(ax, roughDTick, isMinor) {
14831470
Math.pow(10, rng[0])) / nt;
14841471
base = getBase(10);
14851472
ax.dtick = 'L' + roundDTick(roughDTick, base, roundBase10);
1486-
ax.tickformat = '';
14871473
} else {
14881474
// include intermediates between powers of 10,
14891475
// labeled with small digits
14901476
// ax.dtick = "D2" (show 2 and 5) or "D1" (show all digits)
1491-
ax.dtick = (roughDTick > (ax.loglabels === 'full value' ? 0.4 : 0.3)) ? 'D2' : 'D1';
1492-
ax.tickformat = '0.1s';
1493-
ax.hoverformat = '0.2s'; // workaround to fix hoverinfo label formatting
1477+
ax.dtick = (roughDTick > 0.3) ? 'D2' : 'D1';
14941478
}
14951479
} else if(ax.type === 'category' || ax.type === 'multicategory') {
14961480
ax.tick0 = 0;
@@ -3786,7 +3770,7 @@ axes.drawLabels = function(gd, ax, opts) {
37863770

37873771
var sel;
37883772
if(e.K === ZERO_PATH.K) {
3789-
var zerolineLayer = zerolineIsAbove ? mainPlotinfo.zerolinelayerAbove : mainPlotinfo.zerolinelayer;
3773+
var zerolineLayer = zerolineIsAbove ? mainPlotinfo.zerolinelayerAbove : mainPlotinfo.zerolinelayer;
37903774
sel = zerolineLayer.selectAll('.' + ax._id + 'zl');
37913775
} else if(e.K === MINORGRID_PATH.K) sel = mainPlotinfo.minorGridlayer.selectAll('.' + ax._id);
37923776
else if(e.K === GRID_PATH.K) sel = mainPlotinfo.gridlayer.selectAll('.' + ax._id);

0 commit comments

Comments
 (0)