Skip to content

Commit c6b7231

Browse files
committed
refactor and add comment about mock 32 not dropping minor ticks and major steps
1 parent 2ca3881 commit c6b7231

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/plots/cartesian/axes.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -961,14 +961,13 @@ axes.calcTicks = function calcTicks(ax, opts) {
961961
if(!canOverlap) {
962962
// remove duplicate minors
963963

964-
var majorValues = [];
965-
for(var k = 0; k < tickVals.length; k++) {
966-
majorValues.push(tickVals[k].value);
967-
}
964+
var majorValues = tickVals.map(function(d) { return d.value; });
968965

969966
minorTickVals = minorTickVals.filter(function(d) {
970967
return majorValues.indexOf(d.value) === -1;
971968
});
969+
970+
// TODO: also filter using almostEq to handle rounding errors as illustrated by mock 32
972971
}
973972
}
974973

0 commit comments

Comments
 (0)