Skip to content
Prev Previous commit
Next Next commit
fix split mode hover (remove outdated logic)
  • Loading branch information
emilykl committed Nov 13, 2025
commit 680043343e910fe14fbe94353be4c18609def7df
13 changes: 4 additions & 9 deletions src/traces/ohlc/hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,11 @@ function hoverSplit(pointData, xval, yval, hovermode) {
// skip the rest (for this trace) if we didn't find a close point
if(!closestPoint) return [];

var cdIndex = closestPoint.index;
var di = cd[cdIndex];
var hoverinfo = di.hi || trace.hoverinfo;
var hoverParts = hoverinfo.split('+');
var isAll = hoverinfo === 'all';
var hasY = isAll || hoverParts.indexOf('y') !== -1;
var di = cd[closestPoint.index];
var hoverinfo = di.hi || trace.hoverinfo || '';

// similar to hoverOnPoints, we return nothing
// if all or y is not present.
if(!hasY) return [];
// If hoverinfo is 'none' or 'skip', we don't show any hover labels
if (hoverinfo === 'none' || hoverinfo === 'skip') return [];

var attrs = ['high', 'open', 'close', 'low'];

Expand Down