Brushing behavior
Brushing allows the selection of a range of values in a chart, in one or two dimensions. It usually involves clicking a point on the screen with a mousedown or touchstart event, moving the cursor somewhere else (mousemove or touchmove) while drawing an area on the screen, and releasing the cursor when the area is selected (mouseup, touchend, or touchcancel). These native events are grouped in three drag events: start, drag, and end that are handled by a brush behavior object.
In two-dimensional brushes, the selection is represented as two corners of a rectangle. In one-dimensional brushes, the selection is a minimum and a maximum value. The selection rectangle can also be configured with a fixed size and allowed to move ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access