MCPcopy Create free account
hub / github.com/microsoft/SandDance / adjustScheme

Function adjustScheme

docs/app/js/sanddance-app.js:130108–130113  ·  view source on GitHub ↗
(scheme, extent, reverse)

Source from the content-addressed store, hash-verified

130106 return (0, _vegaScale.isInterpolating)(type) ? adjustScheme(scheme$1, extent, _.reverse) : (0, _vegaUtil.isFunction)(scheme$1) ? (0, _vegaScale.quantizeInterpolator)(adjustScheme(scheme$1, extent), count) : type === (0, _vegaScale.Ordinal) ? scheme$1 : scheme$1.slice(0, count);
130107}
130108function adjustScheme(scheme, extent, reverse) {
130109 return (0, _vegaUtil.isFunction)(scheme) && (extent || reverse) ? (0, _vegaScale.interpolateRange)(scheme, flip(extent || [
130110 0,
130111 1
130112 ], reverse)) : scheme;
130113}
130114function flip(array, reverse) {
130115 return reverse ? array.slice().reverse() : array;
130116}

Callers 1

configureSchemeFunction · 0.70

Calls 1

flipFunction · 0.70

Tested by

no test coverage detected