MCPcopy
hub / github.com/palantir/plottable / getExtentsForAttr

Method getExtentsForAttr

src/plots/plot.ts:504–519  ·  view source on GitHub ↗
(attr: string)

Source from the content-addressed store, hash-verified

502 }
503
504 protected getExtentsForAttr(attr: string) {
505 if (this._attrExtents[attr] == null) {
506 const thunk = memThunk(
507 () => this.datasets(),
508 () => this._attrBindings.get(attr),
509 (datasets, accScaleBinding) => {
510 if (accScaleBinding == null || accScaleBinding.accessor == null) {
511 return null;
512 }
513 return datasets.map((dataset) => computeExtent(dataset, accScaleBinding, null));
514 },
515 );
516 this._attrExtents[attr] = thunk;
517 }
518 return this._attrExtents[attr]();
519 }
520
521 /**
522 * Override in subclass to add special extents, such as included values

Callers 1

Calls 4

datasetsMethod · 0.95
memThunkFunction · 0.90
computeExtentFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected