Skip to content

Commit 2ef7b73

Browse files
committed
handle radial axis
1 parent 51a8897 commit 2ef7b73

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/plots/cartesian/axes.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1447,9 +1447,10 @@ function formatDate(ax, out, hover, extraPrecision) {
14471447
else dateStr = headStr + (dateStr ? ', ' + dateStr : '');
14481448
} else if(!ax._inCalcTicks || (headStr !== ax._prevDateHead)) {
14491449
var isInside = (ax.ticklabelposition || '').indexOf('inside') !== -1;
1450+
var side = ax._realSide || ax.side; // polar mocks the side of the radial axis
14501451
if(
1451-
(!isInside && ax.side === 'top') ||
1452-
(isInside && ax.side === 'bottom')
1452+
(!isInside && side === 'top') ||
1453+
(isInside && side === 'bottom')
14531454
) {
14541455
dateStr = headStr + '<br>' + dateStr;
14551456
} else {

src/plots/polar/polar.js

+2
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ proto.updateLayout = function(fullLayout, polarLayout) {
255255
counterclockwise: 'top',
256256
clockwise: 'bottom'
257257
}[radialLayout.side],
258+
// keep track of real side
259+
_realSide: radialLayout.side,
258260
// spans length 1 radius
259261
domain: [innerRadius / gs.w, radius / gs.w]
260262
});

0 commit comments

Comments
 (0)