MCPcopy Index your code
hub / github.com/plotly/plotly.js / orderRangePoints

Function orderRangePoints

src/components/fx/hover.js:2483–2503  ·  view source on GitHub ↗
(hoverData, hovermode)

Source from the content-addressed store, hash-verified

2481}
2482
2483function orderRangePoints(hoverData, hovermode) {
2484 var axLetter = hovermode.charAt(0);
2485
2486 var first = [];
2487 var second = [];
2488 var last = [];
2489
2490 for (var i = 0; i < hoverData.length; i++) {
2491 var d = hoverData[i];
2492
2493 if (Registry.traceIs(d.trace, 'bar-like') || Registry.traceIs(d.trace, 'box-violin')) {
2494 last.push(d);
2495 } else if (d.trace[axLetter + 'period']) {
2496 second.push(d);
2497 } else {
2498 first.push(d);
2499 }
2500 }
2501
2502 return first.concat(second).concat(last);
2503}
2504
2505function getCoord(axLetter, winningPoint, fullLayout) {
2506 var ax = winningPoint[axLetter + 'a'];

Callers 1

sortHoverDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…