Skip to content

Commit 636531b

Browse files
committed
add hovertemplate to make debugging easier in future
1 parent 7febd59 commit 636531b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/jasmine/tests/axes_test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5198,6 +5198,7 @@ describe('Test axes', function() {
51985198
});
51995199

52005200
describe('label positioning using *ticklabelmode*: "period"', function() {
5201+
var hovertemplate = 'x:%{x|%x %X}'; // to make debugging easier
52015202
var gd;
52025203

52035204
beforeEach(function() {
@@ -5220,6 +5221,7 @@ describe('Test axes', function() {
52205221
it('should respect yearly tickformat that includes ' + formatter, function(done) {
52215222
Plotly.newPlot(gd, {
52225223
data: [{
5224+
hovertemplate: hovertemplate,
52235225
x: ['2020-01-01', '2026-01-01']
52245226
}],
52255227
layout: {
@@ -5253,6 +5255,7 @@ describe('Test axes', function() {
52535255
it('should respect quarters tickformat that includes %q', function(done) {
52545256
Plotly.newPlot(gd, {
52555257
data: [{
5258+
hovertemplate: hovertemplate,
52565259
x: ['2020-01-01', '2022-01-01']
52575260
}],
52585261
layout: {
@@ -5285,6 +5288,7 @@ describe('Test axes', function() {
52855288
it('should respect monthly tickformat that includes ' + formatter, function(done) {
52865289
Plotly.newPlot(gd, {
52875290
data: [{
5291+
hovertemplate: hovertemplate,
52885292
x: ['2020-01-01', '2020-07-01']
52895293
}],
52905294
layout: {
@@ -5319,6 +5323,7 @@ describe('Test axes', function() {
53195323
it('should respect Sunday-based week tickformat that includes %U', function(done) {
53205324
Plotly.newPlot(gd, {
53215325
data: [{
5326+
hovertemplate: hovertemplate,
53225327
x: ['2020-02-01', '2020-04-01']
53235328
}],
53245329
layout: {
@@ -5351,6 +5356,7 @@ describe('Test axes', function() {
53515356
it('should respect Monday-based week tickformat that includes ' + formatter, function(done) {
53525357
Plotly.newPlot(gd, {
53535358
data: [{
5359+
hovertemplate: hovertemplate,
53545360
x: ['2020-02-01', '2020-04-01']
53555361
}],
53565362
layout: {
@@ -5387,6 +5393,7 @@ describe('Test axes', function() {
53875393
it('should move weekly labels by one day (i.e. to help center the labels) when *day of week* rangebreak is present', function(done) {
53885394
Plotly.newPlot(gd, {
53895395
data: [{
5396+
hovertemplate: hovertemplate,
53905397
x: [
53915398
'2020-01-01',
53925399
'2020-01-02',
@@ -5450,6 +5457,7 @@ describe('Test axes', function() {
54505457
it('should respect daily tickformat that includes ' + formatter, function(done) {
54515458
Plotly.newPlot(gd, {
54525459
data: [{
5460+
hovertemplate: hovertemplate,
54535461
x: ['2020-01-01', '2020-01-08']
54545462
}],
54555463
layout: {
@@ -5491,6 +5499,7 @@ describe('Test axes', function() {
54915499
it('should respect daily tickformat that includes ' + formatter, function(done) {
54925500
Plotly.newPlot(gd, {
54935501
data: [{
5502+
hovertemplate: hovertemplate,
54945503
x: ['2020-01-01', '2020-01-02']
54955504
}],
54965505
layout: {
@@ -5606,6 +5615,7 @@ describe('Test axes', function() {
56065615
it('should position auto labels | range:' + t.range, function(done) {
56075616
Plotly.newPlot(gd, {
56085617
data: [{
5618+
hovertemplate: hovertemplate,
56095619
x: [
56105620
'2020-12-15',
56115621
'2020-12-15 0:45',
@@ -5701,6 +5711,7 @@ describe('Test axes', function() {
57015711
it('should position auto labels with rangebreaks | range:' + t.range, function(done) {
57025712
Plotly.newPlot(gd, {
57035713
data: [{
5714+
hovertemplate: hovertemplate,
57045715
x: [
57055716
'2020-12-14 08:00', '2020-12-14 12:00', '2020-12-14 16:00',
57065717
'2020-12-15 08:00', '2020-12-15 12:00', '2020-12-15 16:00',

0 commit comments

Comments
 (0)