We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f271d9 commit a5e6aaeCopy full SHA for a5e6aae
src/plots/cartesian/axes.js
@@ -681,6 +681,9 @@ axes.calcTicks = function calcTicks(ax, opts) {
681
ax._prevDateHead = '';
682
ax._inCalcTicks = true;
683
684
+ var minRange = Math.min(rng[0], rng[1]);
685
+ var maxRange = Math.max(rng[0], rng[1]);
686
+
687
var isPeriod = ax.ticklabelmode === 'period';
688
var definedDelta;
689
if(isPeriod && ax.tickformat) {
@@ -743,6 +746,10 @@ axes.calcTicks = function calcTicks(ax, opts) {
743
746
}
744
747
745
748
ticksOut[i].periodX = v;
749
750
+ if(v > maxRange || v < minRange) { // hide label if outside the range
751
+ ticksOut[i].text = '';
752
+ }
753
754
755
0 commit comments