Skip to content
Prev Previous commit
Next Next commit
add test for candlestick/ohlc hovertemplate and split mode
  • Loading branch information
emilykl committed Nov 12, 2025
commit ec46856c7d47405dbb8407ca8b78b549a98b31e5
32 changes: 32 additions & 0 deletions test/jasmine/tests/finance_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1330,5 +1330,37 @@ describe('finance trace hover via Fx.hover():', function () {
})
.then(done, done.fail);
});
it('should ignore hovertemplate in split mode for ' + type, function (done) {
Plotly.newPlot(
gd,
[
{
x: [1, 2, 3],
open: [10, 20, 15],
high: [15, 25, 20],
low: [8, 18, 13],
close: [12, 22, 17],
type: type,
hovertemplate: 'O:%{open} H:%{high}<br>L:%{low} C:%{close}<extra></extra>',
hoverlabel: { split: true }
}
],
{
xaxis: { rangeslider: { visible: false } },
width: 500,
height: 500
}
)
.then(function () {
hover(251, 178);
})
.then(function () {
assertHoverLabelContent({
nums: ['(2, high: 25)', '(2, close: 22)', '(2, open: 20)', '(2, low: 18)'],
name: ['', '', '', '']
});
})
.then(done, done.fail);
});
});
});