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

Function rawDomain

docs/app/js/sanddance-app.js:130022–130027  ·  view source on GitHub ↗
(scale, raw, df)

Source from the content-addressed store, hash-verified

130020 return domain.length;
130021}
130022function rawDomain(scale, raw, df) {
130023 if (raw) {
130024 scale.domain(domainCheck(scale.type, raw, df));
130025 return raw.length;
130026 } else return -1;
130027}
130028function padDomain(type, domain, range, pad, exponent, constant) {
130029 var span = Math.abs((0, _vegaUtil.peek)(range) - range[0]), frac = span / (span - 2 * pad), d = type === (0, _vegaScale.Log) ? (0, _vegaUtil.zoomLog)(domain, null, frac) : type === (0, _vegaScale.Sqrt) ? (0, _vegaUtil.zoomPow)(domain, null, frac, 0.5) : type === (0, _vegaScale.Pow) ? (0, _vegaUtil.zoomPow)(domain, null, frac, exponent || 1) : type === (0, _vegaScale.Symlog) ? (0, _vegaUtil.zoomSymlog)(domain, null, frac, constant || 1) : (0, _vegaUtil.zoomLinear)(domain, null, frac);
130030 domain = domain.slice();

Callers 1

configureDomainFunction · 0.70

Calls 1

domainCheckFunction · 0.70

Tested by

no test coverage detected