Skip to content

Commit cbf1f86

Browse files
committed
fixup calendar on hover handling & add test
1 parent e9e0c83 commit cbf1f86

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/plots/gl3d/scene.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ function render(scene) {
5959

6060
function formatter(axisName, val) {
6161
var axis = scene.fullSceneLayout[axisName];
62-
var calendar = trace[axis._id.charAt(0) + 'calendar'];
6362

64-
return Axes.tickText(axis, axis.d2l(val, 0, calendar), 'hover').text;
63+
return Axes.tickText(axis, axis.d2l(val), 'hover').text;
6564
}
6665

6766
var oldEventData;

test/jasmine/tests/gl_plot_interact_test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ describe('Test gl plot interactions', function() {
155155
.then(hover)
156156
.then(function() {
157157
assertHoverText('x: Mar 3, 2017', 'y: c', 'z: 100k');
158+
159+
return Plotly.relayout(gd, 'scene.xaxis.calendar', 'chinese');
160+
})
161+
.then(hover)
162+
.then(function() {
163+
assertHoverText('x: 二 6, 2017', 'y: c', 'z: 100k');
158164
})
159165
.then(done);
160166
});

0 commit comments

Comments
 (0)