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

Function sizeExpression

docs/app/js/sanddance-app.js:148572–148575  ·  view source on GitHub ↗
(spec, scope, marks)

Source from the content-addressed store, hash-verified

148570 return encode;
148571}
148572function sizeExpression(spec, scope, marks) {
148573 const size = deref(getChannel("size", spec, marks)), strokeWidth = deref(getChannel("strokeWidth", spec, marks)), fontSize = deref(getFontSize(marks[1].encode, scope, GuideLabelStyle));
148574 return (0, _vegaFunctions.parseExpression)(`max(ceil(sqrt(${size})+${strokeWidth}),${fontSize})`, scope);
148575}
148576function getChannel(name, spec, marks) {
148577 return spec[name] ? `scale("${spec[name]}",datum)` : getEncoding(name, marks[0].encode);
148578}

Callers 1

parseLegendFunction · 0.70

Calls 3

derefFunction · 0.70
getChannelFunction · 0.70
getFontSizeFunction · 0.70

Tested by

no test coverage detected