MCPcopy Index your code
hub / github.com/microsoft/SandDance / buildAxisEncode

Function buildAxisEncode

docs/app/js/sanddance-app.js:149308–149329  ·  view source on GitHub ↗
(_, spec)

Source from the content-addressed store, hash-verified

149306 }), scope);
149307}
149308function buildAxisEncode(_, spec) {
149309 const encode = {
149310 enter: {},
149311 update: {}
149312 };
149313 addEncoders(encode, {
149314 orient: _("orient"),
149315 offset: _("offset") || 0,
149316 position: value(spec.position, 0),
149317 titlePadding: _("titlePadding"),
149318 minExtent: _("minExtent"),
149319 maxExtent: _("maxExtent"),
149320 range: {
149321 signal: `abs(span(range("${spec.scale}")))`
149322 },
149323 translate: _("translate"),
149324 // accessibility support
149325 format: spec.format,
149326 formatType: spec.formatType
149327 });
149328 return encode;
149329}
149330function parseScope(spec, scope, preprocessed) {
149331 const signals = (0, _vegaUtil.array)(spec.signals), scales = (0, _vegaUtil.array)(spec.scales); // parse signal definitions, if not already preprocessed
149332 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