Skip to content

brush(data, options)#2363

Open
Fil wants to merge 1 commit intofil/brush-xfrom
fil/brush-data-options
Open

brush(data, options)#2363
Fil wants to merge 1 commit intofil/brush-xfrom
fil/brush-data-options

Conversation

@Fil
Copy link
Contributor

@Fil Fil commented Feb 14, 2026

Support for optional data and options in the brush marks (brush, brushX, brushY).

  • options (x, y, fx, fy) propagate as channel defaults to the reactive marks (inactive, context, focus), so you don't have to repeat them
  • brushX(data) defaults the x option to identity (to support an array of numbers, or dates); similarly brushY(data) defaults y to identity; brush(data) assumes an array of pairs of [x, y] coordinates
  • support for dataless brush(options), brushX(options), and brushY(options)
  • the brush’s selection rect can be styled with the following options: fill, fillOpacity, stroke, strokeWidth, strokeOpacity
  • when data is provided, the value of the plot the filtered subset in the value's data property

@Fil Fil mentioned this pull request Feb 14, 2026
Fil added a commit that referenced this pull request Feb 16, 2026
Since we want to support brushing histograms, we needed two additional features:
* an **interval** option for snapping the brush on gesture end.
* support for X1/X2 channels in renderFilter, for rect marks.

(This will require some work to merge with #2363)
@Fil Fil mentioned this pull request Feb 16, 2026
@Fil Fil force-pushed the fil/brush-data-options branch from 1cb399b to 56f7520 Compare February 16, 2026 23:54
@Fil Fil changed the base branch from fil/brush-dataless to fil/brush-x February 16, 2026 23:55
@Fil Fil marked this pull request as ready for review February 17, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments