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

Function getTraceIndexFromUid

src/plot_api/plot_api.js:2403–2409  ·  view source on GitHub ↗
(uid, data, tracei)

Source from the content-addressed store, hash-verified

2401}
2402
2403function getTraceIndexFromUid(uid, data, tracei) {
2404 for (var i = 0; i < data.length; i++) {
2405 if (data[i].uid === uid) return i;
2406 }
2407 // fall back on trace order, but only if user didn't provide a uid for that trace
2408 return !data[tracei] || data[tracei].uid ? -1 : tracei;
2409}
2410
2411function valsMatch(v1, v2) {
2412 var v1IsObj = Lib.isPlainObject(v1);

Callers 1

applyUIRevisionsFunction · 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…