Interactions
The full pan / zoom / crosshair / context-menu / drag vocabulary across mouse, trackpad, and touch.
EliteChart's interaction model has to handle three input modalities (mouse, trackpad, touch) and four reference frames (chart canvas, price axis, time axis, drawing handles). This page is the exhaustive vocabulary.
Quick example
How it works
Every gesture is dispatched through a central pointer-event router so
the same code path handles a mouse, a trackpad, and a finger. Pinch
is detected on pointerdown count; momentum scrolling is computed
from the last 100 ms of pointer velocity at pointerup.
Chart canvas
| Gesture | Action |
|---|---|
| Mouse wheel up/down | Zoom time axis |
| Trackpad two-finger horizontal | Pan time axis |
| Trackpad two-finger vertical | Pan price axis |
| Trackpad pinch | Zoom both axes |
| Drag (left button) | Pan |
| Drag (middle button) | Box-zoom |
| Right-click | Context menu (drawings, alerts, fit) |
| Touch — one-finger drag | Pan |
| Touch — pinch | Zoom both axes |
| Touch — long-press | Context menu (mobile) |
Price axis (right edge)
| Gesture | Action |
|---|---|
| Drag vertical | Stretch price axis |
| Wheel | Same |
| Double-click | Reset price scale |
| Right-click | Axis options menu |
Time axis (bottom edge)
| Gesture | Action |
|---|---|
| Drag horizontal | Stretch time axis |
| Wheel | Same |
| Double-click | Reset time scale |
| Right-click | Axis options menu |
Drawings
| Gesture | Action |
|---|---|
| Click body | Select |
| Click handle | Begin drag-resize |
| Right-click | Per-drawing menu (delete, duplicate, lock, fix-time) |
Backspace while selected | Delete |
Variations
Disable pan on the chart
Phase 1b — the interactions prop will gate pan/zoom/right-click
independently. For now, intercept at the wrapper:
Snap drawings to the nearest OHLC value
Toggle magnet from the left toolbar or:
Reduced motion
Every animation respects prefers-reduced-motion: reduce. When set,
pan/zoom transitions instantaneously rather than easing.