Skip to main content

Interface: BrushFilterOptions<R>

Defined in: packages/sdvplot/src/interact/brush.ts:14

What brushFilter brushes: the figure's rows, the fields its brushed axes encode (x and y, or one alone), each row's link id, what a brush holding no row means, and the scales of a chart that has no figure.scale.

Type Parameters​

R​

R

Properties​

data​

data: readonly R[]

Defined in: packages/sdvplot/src/interact/brush.ts:16

The rows the figure was drawn from.


empty?​

optional empty?: "clear" | "dim"

Defined in: packages/sdvplot/src/interact/brush.ts:28

A brush that holds no row. "dim" (the default): its region stays in the store, so every mark dims and a linked table shows no row. "clear": it is no filter at all; the store goes idle and, when the gesture ends, the drawn rectangle is removed (a date window over the All-Star break selects no game, and left drawn would look applied).


id?​

optional id?: Field<R>

Defined in: packages/sdvplot/src/interact/brush.ts:22

The link id per row: the same values as the marks' id / linkIds channel. Default: the row index.


scales?​

optional scales?: object

Defined in: packages/sdvplot/src/interact/brush.ts:33

The brushed axes' scales, overriding figure.scale: how a d3-drawn chart, which has none, is brushed. A d3 scale goes in as it is (d3.scaleUtc(), whose range() is a method); a ScaleLike works too.

x?​

optional x?: ScaleLike | D3ScaleLike

y?​

optional y?: ScaleLike | D3ScaleLike


x?​

optional x?: Field<R>

Defined in: packages/sdvplot/src/interact/brush.ts:18

The field the figure's x scale encodes. Without y, a 1-D brush along x over the svg's full height.


y?​

optional y?: Field<R>

Defined in: packages/sdvplot/src/interact/brush.ts:20

The field the figure's y scale encodes. Without x, a 1-D brush along y over the svg's full width.