Interface D3BrushEvent<Datum>

D3 brush event

The generic refers to the type of the datum for the group element on which brush was defined.

interface D3BrushEvent {
    mode: "drag" | "space" | "handle" | "center";
    selection: BrushSelection;
    sourceEvent: any;
    target: BrushBehavior<Datum>;
    type: string;
}

Type Parameters

  • Datum

Properties

mode: "drag" | "space" | "handle" | "center"

The mode of the brush.

selection: BrushSelection

The current brush selection associated with the event. This is null when the selection is empty.

sourceEvent: any

The underlying input event, such as mousemove or touchmove.

target: BrushBehavior<Datum>

The BrushBehavior associated with the event

type: string

The event type for the BrushEvent