Skip to content

Commit 00b30c3

Browse files
committed
Avoid checking xbnd when not defined
1 parent 0f136e5 commit 00b30c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plots/cartesian/axes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2807,7 +2807,7 @@ function getBoundaryVals(ax, vals) {
28072807
// boundaryVals are never used for labels;
28082808
// no need to worry about the other tickTextObj keys
28092809
var _push = function(d, bndIndex) {
2810-
var xb = d.xbnd[bndIndex];
2810+
var xb = d.xbnd ? d.xbnd[bndIndex] : d.x;
28112811
if(xb !== null) {
28122812
out.push(Lib.extendFlat({}, d, {x: xb}));
28132813
}
@@ -3755,7 +3755,7 @@ axes.drawLabels = function(gd, ax, opts) {
37553755
// TODO should secondary labels also fall into this fix-overlap regime?
37563756

37573757
for(i = 0; i < lbbArray.length; i++) {
3758-
var xbnd = vals[i].xbnd;
3758+
var xbnd = (vals && vals[i].xbnd) ? vals[i].xbnd : [null, null];
37593759
var lbb = lbbArray[i];
37603760
if(
37613761
(xbnd[0] !== null && (lbb.left - ax.l2p(xbnd[0])) < gap) ||

0 commit comments

Comments
 (0)