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

Function buildAxisEncode

docs/tests/v3/es6/js/sanddance-test-es6.js:97239–97260  ·  view source on GitHub ↗
(_, spec)

Source from the content-addressed store, hash-verified

97237 }), scope);
97238}
97239function buildAxisEncode(_, spec) {
97240 const encode = {
97241 enter: {},
97242 update: {}
97243 };
97244 addEncoders(encode, {
97245 orient: _("orient"),
97246 offset: _("offset") || 0,
97247 position: value(spec.position, 0),
97248 titlePadding: _("titlePadding"),
97249 minExtent: _("minExtent"),
97250 maxExtent: _("maxExtent"),
97251 range: {
97252 signal: `abs(span(range("${spec.scale}")))`
97253 },
97254 translate: _("translate"),
97255 // accessibility support
97256 format: spec.format,
97257 formatType: spec.formatType
97258 });
97259 return encode;
97260}
97261function parseScope(spec, scope, preprocessed) {
97262 const signals = (0, _vegaUtil.array)(spec.signals), scales = (0, _vegaUtil.array)(spec.scales); // parse signal definitions, if not already preprocessed
97263 if (!preprocessed) signals.forEach((_)=>parseSignal(_, scope)); // parse cartographic projection definitions

Callers 1

parseAxisFunction · 0.70

Calls 3

addEncodersFunction · 0.70
_Function · 0.70
valueFunction · 0.70

Tested by

no test coverage detected