Skip to content
Source
Sign inSign up
TanStack/charts

[Feature] brushX: a transient drag-range mode #198

Opentoomingos(GitHub profile, opens in a new tab) opened this issue 1 comment

Problem

A line or area chart should keep hover tooltip and crosshair, and also let the user press-drag to get an unsnapped x range. The range should exist only while the button is held. brushX cannot do this: its range is persistent and has handles.

Expected

An opt-in mode such as { persistent: false, handles: false }: preview events while dragging, one commit on release, then the range resets (also on pointer leave or cancel). Idle hover can use hover: 'passthrough' once #162 lands.

The docs could also link the existing application-owned route (pointer: false with interaction.resolvePointer and setControlledFocus) from the brush docs (interactions-and-selections.md:447-451, interactions-and-selections.md:370-374).

PR #162 fixes hover focus being cleared while brushX is mounted. Nothing covers the transient mode.

  1. toomingos(GitHub profile, opens in a new tab) changed the title

  2. Thanks for spelling out the transient-range use case. The brush guide now links to the existing application-owned pointer and scale-inversion APIs in #252.

    The first-party transient brush option is still open here.

Sign in to join this conversation.