Skip to content

Commit 6800433

Browse files
committed
fix split mode hover (remove outdated logic)
1 parent ec46856 commit 6800433

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/traces/ohlc/hover.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,11 @@ function hoverSplit(pointData, xval, yval, hovermode) {
9999
// skip the rest (for this trace) if we didn't find a close point
100100
if(!closestPoint) return [];
101101

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

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

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

0 commit comments

Comments
 (0)