Skip to content

Commit ec46856

Browse files
committed
add test for candlestick/ohlc hovertemplate and split mode
1 parent a1c0e8b commit ec46856

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

test/jasmine/tests/finance_test.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,5 +1330,37 @@ describe('finance trace hover via Fx.hover():', function () {
13301330
})
13311331
.then(done, done.fail);
13321332
});
1333+
it('should ignore hovertemplate in split mode for ' + type, function (done) {
1334+
Plotly.newPlot(
1335+
gd,
1336+
[
1337+
{
1338+
x: [1, 2, 3],
1339+
open: [10, 20, 15],
1340+
high: [15, 25, 20],
1341+
low: [8, 18, 13],
1342+
close: [12, 22, 17],
1343+
type: type,
1344+
hovertemplate: 'O:%{open} H:%{high}<br>L:%{low} C:%{close}<extra></extra>',
1345+
hoverlabel: { split: true }
1346+
}
1347+
],
1348+
{
1349+
xaxis: { rangeslider: { visible: false } },
1350+
width: 500,
1351+
height: 500
1352+
}
1353+
)
1354+
.then(function () {
1355+
hover(251, 178);
1356+
})
1357+
.then(function () {
1358+
assertHoverLabelContent({
1359+
nums: ['(2, high: 25)', '(2, close: 22)', '(2, open: 20)', '(2, low: 18)'],
1360+
name: ['', '', '', '']
1361+
});
1362+
})
1363+
.then(done, done.fail);
1364+
});
13331365
});
13341366
});

0 commit comments

Comments
 (0)