Skip to content

Commit

Permalink
preserve date heads while skipping labels
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Feb 3, 2022
1 parent 3734680 commit 3d46d98
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,11 +944,13 @@ axes.calcTicks = function calcTicks(ax, opts) {
ax._prevDateHead = '';
ax._inCalcTicks = true;

var firstLabelCreated = false;
var ticksOut = [];
var t, p;
for(i = 0; i < tickVals.length; i++) {
var _minor = tickVals[i].minor;
var _value = tickVals[i].value;
var _skipLabel = tickVals[i].skipLabel;

t = axes.tickText(
ax,
Expand All @@ -958,7 +960,11 @@ axes.calcTicks = function calcTicks(ax, opts) {
);

if(tickVals[i].skipLabel) {
t.skipLabel = true;
t.skipLabel = _skipLabel;

if(!firstLabelCreated) ax._prevDateHead = '';
} else {
firstLabelCreated = true;
}

p = tickVals[i].periodX;
Expand Down

0 comments on commit 3d46d98

Please sign in to comment.