Skip to content

Commit 11dcbf5

Browse files
committed
keep second line
1 parent 2ef7b73 commit 11dcbf5

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/plots/cartesian/axes.js

+13-9
Original file line numberDiff line numberDiff line change
@@ -1445,19 +1445,23 @@ function formatDate(ax, out, hover, extraPrecision) {
14451445
// except for year headPart: turn this into "Jan 1, 2000" etc.
14461446
if(tr === 'd') dateStr += ', ' + headStr;
14471447
else dateStr = headStr + (dateStr ? ', ' + dateStr : '');
1448-
} else if(!ax._inCalcTicks || (headStr !== ax._prevDateHead)) {
1449-
var isInside = (ax.ticklabelposition || '').indexOf('inside') !== -1;
1450-
var side = ax._realSide || ax.side; // polar mocks the side of the radial axis
1448+
} else {
14511449
if(
1452-
(!isInside && side === 'top') ||
1453-
(isInside && side === 'bottom')
1450+
!ax._inCalcTicks ||
1451+
ax._prevDateHead !== headStr
14541452
) {
1455-
dateStr = headStr + '<br>' + dateStr;
1456-
} else {
1453+
ax._prevDateHead = headStr;
14571454
dateStr += '<br>' + headStr;
1455+
} else {
1456+
var isInside = (ax.ticklabelposition || '').indexOf('inside') !== -1;
1457+
var side = ax._realSide || ax.side; // polar mocks the side of the radial axis
1458+
if(
1459+
(!isInside && side === 'top') ||
1460+
(isInside && side === 'bottom')
1461+
) {
1462+
dateStr += '<br> ';
1463+
}
14581464
}
1459-
1460-
ax._prevDateHead = headStr;
14611465
}
14621466
}
14631467

-61 Bytes
Loading
259 Bytes
Loading

0 commit comments

Comments
 (0)