Skip to content

Function: selectionDim()

Call Signature

selectionDim(spec): SelectionDim<IntervalValue>

Defined in: mosaic-selection.ts:248

Declare one cross-filter dimension. Returns the semantic-value box; also registers a real set-<name> action (a named, schema'd agent tool via the standard-tools pipeline) and enrolls the dimension in the surface snapshot.

ts
/** Magnitude window — the completeness bracket every view filters by. */
export const mag = selectionDim({
  scope: appScope,
  kind: "interval",
  targets: [{ selection: brush, field: "mag", table: "quakes" }],
  min: 0, max: 10,
});
mag.set({ lo: 5 });        // one-sided: mag >= 5, every view updates
mag.set({ lo: 5, hi: 6 }); // replaces (stable source), never stacks
mag.clear();

Parameters

spec

IntervalDimSpec

Returns

SelectionDim<IntervalValue>

Call Signature

selectionDim(spec): SelectionDim<PointValue>

Defined in: mosaic-selection.ts:249

Declare one cross-filter dimension. Returns the semantic-value box; also registers a real set-<name> action (a named, schema'd agent tool via the standard-tools pipeline) and enrolls the dimension in the surface snapshot.

ts
/** Magnitude window — the completeness bracket every view filters by. */
export const mag = selectionDim({
  scope: appScope,
  kind: "interval",
  targets: [{ selection: brush, field: "mag", table: "quakes" }],
  min: 0, max: 10,
});
mag.set({ lo: 5 });        // one-sided: mag >= 5, every view updates
mag.set({ lo: 5, hi: 6 }); // replaces (stable source), never stacks
mag.clear();

Parameters

spec

PointDimSpec

Returns

SelectionDim<PointValue>