MCPcopy
hub / github.com/plotly/plotly.js / calcLineOverlap

Function calcLineOverlap

test/jasmine/tests/hover_label_test.js:1995–2001  ·  view source on GitHub ↗
(minA, maxA, minB, maxB)

Source from the content-addressed store, hash-verified

1993 }
1994
1995 function calcLineOverlap(minA, maxA, minB, maxB) {
1996 expect(minA).toBeLessThan(maxA);
1997 expect(minB).toBeLessThan(maxB);
1998
1999 var overlap = Math.min(maxA, maxB) - Math.max(minA, minB);
2000 return Math.max(0, overlap);
2001 }
2002
2003 function labelCount() {
2004 return d3Select(gd).selectAll('g.hovertext').size();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…