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

Function cache

src/traces/indicator/plot.js:867–876  ·  view source on GitHub ↗
(trace, name, initialValue, value, key, fn)

Source from the content-addressed store, hash-verified

865}
866
867function cache(trace, name, initialValue, value, key, fn) {
868 var objName = '_cache' + name;
869 if(!(trace[objName] && trace[objName].key === key)) {
870 trace[objName] = {key: key, value: initialValue};
871 }
872 var v = Lib.aggNums(fn, null, [trace[objName].value, value], 2);
873 trace[objName].value = v;
874
875 return v;
876}

Callers 1

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