MCPcopy Create free account
hub / github.com/plotly/plotly.js / callback

Function callback

src/plot_api/plot_schema.js:161–181  ·  view source on GitHub ↗
(attr, attrName, attrs, level)

Source from the content-addressed store, hash-verified

159 var baseContainer, baseAttrName;
160
161 function callback(attr, attrName, attrs, level) {
162 stack = stack.slice(0, level).concat([attrName]);
163 isArrayStack = isArrayStack.slice(0, level).concat([attr && attr._isLinkedToArray]);
164
165 var splittableAttr = (
166 attr &&
167 (attr.valType === 'data_array' || attr.arrayOk === true) &&
168 !(stack[level - 1] === 'colorbar' && (attrName === 'ticktext' || attrName === 'tickvals'))
169 );
170
171 // Manually exclude 'colorbar.tickvals' and 'colorbar.ticktext' for now
172 // which are declared as `valType: 'data_array'` but scale independently of
173 // the coordinate arrays.
174 //
175 // Down the road, we might want to add a schema field (e.g `uncorrelatedArray: true`)
176 // to distinguish attributes of the likes.
177
178 if(!splittableAttr) return;
179
180 crawlIntoTrace(baseContainer, 0, '');
181 }
182
183 function crawlIntoTrace(container, i, astrPartial) {
184 var item = container[stack[i]];

Callers 8

execFunction · 0.85
axisBrushMovedFunction · 0.85
crawlFunction · 0.85
plot_schema.jsFile · 0.85
handleEventFunction · 0.85
handleBlurFunction · 0.85
handleModsFunction · 0.85
listenerFunction · 0.85

Calls 2

crawlIntoTraceFunction · 0.85
makeSrcAttrFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…