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

Method getOffset

docs/app/js/sanddance-app.js:4207–4216  ·  view source on GitHub ↗
(horizontal, binField)

Source from the content-addressed store, hash-verified

4205 };
4206 }
4207 getOffset(horizontal, binField) {
4208 const { names , props } = this;
4209 const { parentScope } = props;
4210 return {
4211 x: (0, _scope.addOffsets)(parentScope.offsets.x, horizontal ? "" : `scale(${JSON.stringify(names.xScale)}, datum[${JSON.stringify(binField)}])`),
4212 y: (0, _scope.addOffsets)(parentScope.offsets.y, horizontal ? `scale(${JSON.stringify(names.yScale)}, datum[${JSON.stringify(binField)}])` : ""),
4213 h: horizontal ? names.bandWidth : parentScope.offsets.h,
4214 w: horizontal ? parentScope.offsets.w : names.bandWidth
4215 };
4216 }
4217 getScales(bin, horizontal) {
4218 const { names } = this;
4219 const { parentScope } = this.props;

Callers 1

buildMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected