d3/d3-brush

How to fix one end of the Brush in D3.js?

ashitvora-zz opened this issue · 1 comments

I have a Slider created using D3 and want to fix one end of the slider to Starting of the Brush extent whereas want the other end to be draggable so user can change the selection.

I am able to disable the entire dragging but not sure how to keep dragging enabled but fix one end of the brush.

Any help is highly appreciated.

Thanks :)

Sure, you could use the same technique as in the brush snapping example:

https://observablehq.com/@d3/brush-snapping

Instead of rounding, though, you’d fix the start of the brush’s selection.

Sorry for the delayed response!