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

Function validateDimensionDisplayInds

src/traces/parcats/calc.js:446–459  ·  view source on GitHub ↗

* Validate the requested display order for the dimensions. * If the display order is a permutation of 0 through dimensions.length - 1, link to _displayindex * Otherwise, replace the display order with the dimension order * @param {Object} trace

(visibleDims)

Source from the content-addressed store, hash-verified

444 * @param {Object} trace
445 */
446function validateDimensionDisplayInds(visibleDims) {
447 var displayInds = visibleDims.map(function(d) { return d.displayindex; });
448 var i;
449
450 if(isRangePermutation(displayInds)) {
451 for(i = 0; i < visibleDims.length; i++) {
452 visibleDims[i]._displayindex = visibleDims[i].displayindex;
453 }
454 } else {
455 for(i = 0; i < visibleDims.length; i++) {
456 visibleDims[i]._displayindex = i;
457 }
458 }
459}
460
461
462/**

Callers 1

calc.jsFile · 0.85

Calls 1

isRangePermutationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…