Keyboard and Touch
SciTrader has optional modifiers that let users work the chart and its drawings from the keyboard, and a touch mode for the drawing tools on phones and tablets:
| Modifier or option | What it adds |
|---|---|
On | Arrow keys pan, + and - zoom, 0 resets the zoom |
Annotation | Keys to select, delete, duplicate and nudge drawings, and to draw again |
On | Zoom, pan and reset buttons on the pane under the mouse |
The controller's touch option | Long press selects a drawing; placement uses a cursor you drag and tap |
The modifiers are SciChart chart modifiers: add them to each pane's surface, as below.
Keyboard Focus
A pane takes keyboard focus when it is clicked, and the keys act on that pane. The keyboard modifiers make each pane focusable with Tab too, and add the class st-pane--focused to the focused pane, or to the element you pass as focusIndicatorElement.
scitrader.css doesn't style st-pane--focused, so a focused pane looks no different. Give it a look of your own, so keyboard users can see which pane the keys act on:
/* An outline on the pane with keyboard focus */
.st-pane--focused { outline: 2px solid var(--st-ui-selection, #6c63ff); outline-offset: -2px; }
Zoom and Pan Keys: OnChartKeyboardZoomPanModifier
| Key | Action |
|---|---|
← / → | Pan the time axis left or right |
+ or = | Zoom in |
- | Zoom out |
0 | Reset the zoom to fit |
| Shift with any of these | A bigger step |
Keys with Ctrl, Alt or Cmd are left to the browser. When a drawing is selected, the arrow keys nudge it instead; see below.
Drawing Keys: AnnotationKeyboardSelectionModifier
| Key | Action |
|---|---|
N / P | Select the next or previous drawing, across every pane |
Delete or Backspace | Remove the selected drawing |
D | Duplicate the selected drawing, offset 20 pixels down and right, and select the copy |
| Arrow keys | Nudge the selected drawing by 1 pixel, or 10 with Shift |
Esc | Deselect, and call on |
A | Call on, e.g. to draw again with the last tool |
A and Esc call back to your app, which knows which tool to start and how to cancel:
new AnnotationKeyboardSelectionModifier({
// A: draw again with the last tool used, or freehand if none has been
onAddAnnotation: () => drawing.selectTool(drawing.lastUsedTool ?? ETradingAnnotationType.FreehandDrawingAnnotation),
// Esc: also cancel a drawing in progress
onCancelPlacement: () => drawing.stop(),
// Called when N, P, D, Delete or Esc changes the selection: the drawing, or undefined
onSelectionChanged: (annotation) => console.log("selected by keyboard:", annotation),
});
onSelectionChanged covers keyboard selection only. For every selection, use each drawing's selectedChanged event; see Editing Drawings.
On-Chart Buttons: OnChartButtonsModifier
OnChartButtonsModifier adds a strip of zoom in, zoom out, pan left, pan right and reset buttons to the bottom of the pane under the mouse. On a touch screen, the strip shows on the pane last tapped. visible: false attaches it hidden, and setVisible(true) shows it later, e.g. from a setting.
Its look is .st-on-chart-buttons in scitrader.css.
Touch Screens: the touch Option
Pass touch: true to DrawingToolsController.attach, or to useDrawingTools in React, for a touch layout:
- A long press selects a drawing, and keeps it held so a drag moves it straight away. A tap doesn't select, because it may start a pan. The phone vibrates briefly where the browser allows.
- Placement uses a cursor: drag to aim, then tap to commit each point. Lifting after a drag only moves the cursor.
The placement cursor applies to a mouse too: with touch on, a mouse user also drags the cursor to aim and clicks to commit each point. Selection by mouse is unchanged. Turn touch on for touch screens only, e.g. from matchMedia("(pointer: coarse)"):
const drawing = DrawingToolsController.attach(financeChartPanel.financeApi, {
touch: matchMedia("(pointer: coarse)").matches, // on for phones and tablets
selectFinishedDrawing: false, // leave a new drawing unselected, so its editor doesn't cover the chart
});
| Option | What it does |
|---|---|
touch | true for the touch layout. Pass Annotation options instead to tune it: hold (450), cancel (10), hit (22), haptic (10, or 0 for none) |
select | Whether a new drawing stays selected, showing its quick-edit toolbar. Default true. false suits a phone, where an editor would cover the chart |
resume | Called to turn pan, x-axis drag and zoom-to-extents back on when a tool finishes. By default the controller turns them back on itself. Pass this if your app sometimes keeps them off, e.g. a touch "cursor mode" in which a drag moves the crosshair |
Adding the Modifiers to Every Pane
Add the modifiers to each pane's surface, chart.chartPanes. A study can add a pane later, and paneConfigured fires as each pane is set up, so add them to new panes then:
const done = new Set<SciChartSurface>();
const addToAllPanes = () =>
chart.chartPanes.forEach(({ surface }) => {
if (!surface || done.has(surface)) return;
done.add(surface);
surface.chartModifiers.add(
new OnChartKeyboardZoomPanModifier(),
new AnnotationKeyboardSelectionModifier({ onAddAnnotation, onCancelPlacement }),
new OnChartButtonsModifier({ visible: true })
);
});
addToAllPanes();
chart.paneConfigured.subscribe(addToAllPanes);
TypeScript Example: Keyboard Shortcuts, Touch and On-Chart Buttons
A BTC-USD chart from Coinbase with an RSI pane, the drawing-tools rail, and all three modifiers on every pane. Draw something, click a pane, then try the keys listed above the chart. Hover a pane for its zoom and pan buttons. On a touch screen, touch is on: long-press a drawing to select it.
The code for this example is found below.
- TS
import "scichart-scitrader/scitrader.css";
import { SciChartSurface } from "scichart";
import { ETradingAnnotationType } from "scichart-financial-tools";
import {
AnnotationKeyboardSelectionModifier,
CandleInterval,
CoinbaseExchange,
defaultExchangeProvider,
DrawingToolbar,
DrawingToolsController,
idbPriceStore,
OHLCStudy,
OnChartButtonsModifier,
OnChartKeyboardZoomPanModifier,
RSIStudy,
SciFinanceChartPanel,
VolumeStudy,
} from "scichart-scitrader";
// This example expects this HTML:
// <div style="display: flex; flex-direction: column; height: 100%">
// <div id="keys"></div>
// <div style="display: flex; flex: 1; min-height: 0">
// <div id="tools"></div>
// <div id="chart" style="flex: 1; min-width: 0"></div>
// </div>
// </div>
// Register a data source, once, at app startup
defaultExchangeProvider.registerExchange(CoinbaseExchange, idbPriceStore);
async function createChart() {
const keys = document.getElementById("keys");
Object.assign(keys.style, keysStyle);
keys.textContent =
"Click a pane, then: N / P select drawings, Delete removes, D duplicates, arrows nudge (Shift: 10 px), " +
"Esc deselects, A draws again. With nothing selected: arrows pan, + / - zoom, 0 resets.";
const financeChartPanel = await SciFinanceChartPanel.create(document.getElementById("chart"), {
exchangeName: CoinbaseExchange.name, // name="Coinbase" matches the built-in CoinbaseExchange
symbol: "BTC-USD",
interval: CandleInterval.SIX_HOURS,
period: "3M",
studies: [new OHLCStudy(), new VolumeStudy(), new RSIStudy()],
});
const chart = financeChartPanel.financeApi;
// Touch: a long press selects a drawing, and placement uses a cursor you drag to aim and tap to
// commit. The cursor applies to a mouse too, so turn touch on for touch screens only
const drawing = DrawingToolsController.attach(chart, { touch: matchMedia("(pointer: coarse)").matches });
const toolbar = DrawingToolbar.create(document.getElementById("tools"), drawing, { orientation: "vertical" });
// The keyboard and on-chart button modifiers are optional, and added to each pane's surface
function addModifiers(surface: SciChartSurface) {
surface.chartModifiers.add(
// Arrow keys pan, + / - zoom, 0 resets the zoom (Shift for bigger steps)
new OnChartKeyboardZoomPanModifier(),
// N / P step through the drawings on every pane, Delete removes the selected one, D duplicates
// it, arrow keys nudge it, Esc deselects. A and Esc call back to your app:
new AnnotationKeyboardSelectionModifier({
// A: draw again with the last tool used, or freehand if none has been
onAddAnnotation: () =>
drawing.selectTool(drawing.lastUsedTool ?? ETradingAnnotationType.FreehandDrawingAnnotation),
// Esc: also cancel a drawing in progress
onCancelPlacement: () => drawing.stop(),
}),
// Zoom, pan and reset buttons on the pane under the mouse
new OnChartButtonsModifier({ visible: true })
);
}
// Add the modifiers to every pane now, and to panes added later, e.g. by a new study:
// paneConfigured fires as each pane is set up
const done = new Set<SciChartSurface>();
const addToAllPanes = () =>
chart.chartPanes.forEach(({ surface }) => {
if (surface && !done.has(surface)) {
done.add(surface);
addModifiers(surface);
}
});
addToAllPanes();
chart.paneConfigured.subscribe(addToAllPanes);
// When the page goes away:
// chart.paneConfigured.unsubscribe(addToAllPanes); toolbar.destroy(); drawing.detach(); financeChartPanel.cleanup();
return { financeChartPanel, drawing, toolbar };
}
// The key help uses SciTrader's UI colours: its --st-ui-* CSS variables, with the stylesheet's defaults
const keysStyle: Partial<CSSStyleDeclaration> = {
padding: "8px 12px",
background: "var(--st-ui-background, #2b2839)",
borderBottom: "1px solid var(--st-ui-divider, rgba(255,255,255,0.1))",
color: "var(--st-ui-text-muted, #9da2bc)",
fontSize: "13px",
};
createChart();
React Example: Keyboard Shortcuts, Touch and On-Chart Buttons
The same chart in React. The modifiers are added in an effect, once the chart and the controller are ready, and to panes added later.
The code for this example is found below.
- React
import "scichart-scitrader/scitrader.css";
import * as React from "react";
import { SciChartSurface } from "scichart";
import { ETradingAnnotationType } from "scichart-financial-tools";
import {
AnnotationKeyboardSelectionModifier,
CandleInterval,
CoinbaseExchange,
defaultExchangeProvider,
idbPriceStore,
ISciFinanceChartPanelApi,
ISciFinanceChartPanelConfig,
OHLCStudy,
OnChartButtonsModifier,
OnChartKeyboardZoomPanModifier,
RSIStudy,
VolumeStudy,
} from "scichart-scitrader";
import { DrawingToolbar, SciFinanceChartView, useDrawingTools } from "scichart-scitrader-react";
// Register a data source, once, at app startup
defaultExchangeProvider.registerExchange(CoinbaseExchange, idbPriceStore);
// Touch: a long press selects a drawing, and placement uses a cursor you drag to aim and tap to
// commit. The cursor applies to a mouse too, so turn touch on for touch screens only
const DRAWING_OPTIONS = { touch: matchMedia("(pointer: coarse)").matches };
export function KeyboardAndTouchChart() {
const [chartApi, setChartApi] = React.useState<ISciFinanceChartPanelApi>();
const { controller } = useDrawingTools(chartApi, DRAWING_OPTIONS);
// Create the config once per mounted chart: studies are live objects bound to one chart
const config = React.useMemo<ISciFinanceChartPanelConfig>(
() => ({
exchangeName: CoinbaseExchange.name, // name="Coinbase" matches the built-in CoinbaseExchange
symbol: "BTC-USD",
interval: CandleInterval.SIX_HOURS,
period: "3M",
studies: [new OHLCStudy(), new VolumeStudy(), new RSIStudy()],
}),
[]
);
// The keyboard and on-chart button modifiers are optional, and added to each pane's surface:
// every pane now, and panes added later (paneConfigured fires as each pane is set up)
React.useEffect(() => {
if (!chartApi || !controller) return undefined;
const chart = chartApi.financeApi;
const done = new Set<SciChartSurface>();
const addToAllPanes = () =>
chart.chartPanes.forEach(({ surface }) => {
if (!surface || done.has(surface)) return;
done.add(surface);
surface.chartModifiers.add(
// Arrow keys pan, + / - zoom, 0 resets the zoom (Shift for bigger steps)
new OnChartKeyboardZoomPanModifier(),
// N / P step through the drawings on every pane, Delete removes the selected one,
// D duplicates it, arrow keys nudge it, Esc deselects. A and Esc call back to your app:
new AnnotationKeyboardSelectionModifier({
// A: draw again with the last tool used, or freehand if none has been
onAddAnnotation: () =>
controller.selectTool(controller.lastUsedTool ?? ETradingAnnotationType.FreehandDrawingAnnotation),
// Esc: also cancel a drawing in progress
onCancelPlacement: () => controller.stop(),
}),
// Zoom, pan and reset buttons on the pane under the mouse
new OnChartButtonsModifier({ visible: true })
);
});
addToAllPanes();
chart.paneConfigured.subscribe(addToAllPanes);
return () => chart.paneConfigured.unsubscribe(addToAllPanes);
}, [chartApi, controller]);
// Fills its parent, so give the parent a height
return (
<div style={{ display: "flex", flexDirection: "column", height: "100%" }}>
<div style={keysStyle}>
Click a pane, then: N / P select drawings, Delete removes, D duplicates, arrows nudge (Shift: 10 px), Esc
deselects, A draws again. With nothing selected: arrows pan, + / - zoom, 0 resets.
</div>
<div style={{ display: "flex", flex: 1, minHeight: 0 }}>
<DrawingToolbar controller={controller} orientation="vertical" />
<div style={{ flex: 1, minWidth: 0 }}>
<SciFinanceChartView config={config} onInit={setChartApi} />
</div>
</div>
</div>
);
}
// The key help uses SciTrader's UI colours: its --st-ui-* CSS variables, with the stylesheet's defaults
const keysStyle: React.CSSProperties = {
padding: "8px 12px",
background: "var(--st-ui-background, #2b2839)",
borderBottom: "1px solid var(--st-ui-divider, rgba(255,255,255,0.1))",
color: "var(--st-ui-text-muted, #9da2bc)",
fontSize: 13,
};
Styling the On-Chart Buttons
| Class | Element |
|---|---|
. | The strip |
. | A button |
The default on-chart buttons CSS (.st-on-chart-buttons), from scitrader.css
.st-on-chart-buttons {
gap: 4px;
padding: 4px;
border-radius: 6px;
background: var(--st-ui-toolbar-background, rgba(20,20,30,0.85));
}
.st-on-chart-buttons__button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
border: none;
border-radius: 50%;
background: transparent;
color: var(--st-ui-icon, #e5e7eb);
cursor: pointer;
}
.st-on-chart-buttons__button:hover {
color: var(--st-ui-text, #ffffff);
background: rgb(var(--st-ui-overlay-rgb, 255 255 255) / 0.08);
}
Keyboard and Touch API
The OnChartKeyboardZoomPanModifier and AnnotationKeyboardSelectionModifier classes, their options and FOCUSED_PANE_CLASS, with their TSDoc
/**
* Chart navigation via the keyboard. Mirrors {@link OnChartButtonsModifier}'s
* button actions:
*
* - `ArrowLeft` / `ArrowRight` — pan the X axis left / right.
* - `=` / `+` — zoom in.
* - `-` — zoom out.
* - `0` — reset to fit.
* - Hold `Shift` with any of the above for a {@link SHIFT_MULTIPLIER}×
* step.
*
* Modifier keys (Ctrl/Alt/Cmd) bypass the handler — they're already
* filtered out by {@link ChartKeyboardModifierBase.handleKeyDownBound}.
*
* Actions delegate to the surface's existing finance modifiers
* ({@link RightPeggedMouseWheelModifier.panXBy} /
* {@link RightPeggedMouseWheelModifier.zoomXBy} /
* {@link FinChartZoomExtentsModifier.resetZoom}) so the feel matches the
* wheel, double-click and on-chart-button paths.
*
* Co-exists with {@link AnnotationKeyboardSelectionModifier} (N / P / Esc)
* — different key map, no overlap.
*/
class OnChartKeyboardZoomPanModifier extends ChartKeyboardModifierBase {
readonly type: string;
constructor(options?: IChartKeyboardModifierOptions);
}
/**
* Annotation selection keyboard layer — operates across every pane in
* the dashboard at once. The user can cycle / delete / nudge selection
* without first clicking a specific pane.
*
* - `N` / `n` advances to the next annotation in z-order across ALL panes
* (wraps when the last pane's last annotation is reached).
* - `P` / `p` retreats the same way.
* - `Escape` clears the selection on every pane AND invokes the
* `onCancelPlacement` callback so the App can cancel any in-flight
* placement / freehand draw on the side.
* - `Delete` / `Backspace` removes the currently-selected annotation
* (operates on `annotation.parentSurface` so the right collection is
* touched).
* - `D` / `d` duplicates the selected annotation — same type and options,
* points offset 20 px down-right, added to the same surface, selection
* transferred to the duplicate.
* - `A` / `a` invokes the `onAddAnnotation` callback (passed via options).
* App-side wiring re-triggers the last-used drawing tool on the
* currently-active pane.
* - Arrow keys nudge the selected annotation by 1 px (10 px with Shift).
* When NO annotation is selected the keys are passed through and
* `OnChartKeyboardZoomPanModifier` pans the focused pane instead.
*
* Implementation:
* - Each pane has its own modifier instance (registered in `onAttach`).
* - Instances register themselves in {@link AnnotationKeyboardSelectionModifier.instances}.
* - `shouldHandle` only returns true on the first instance ("leader")
* so a single keystroke isn't handled three times.
* - The leader reads annotations from EVERY instance's surface, not
* just its own, giving cross-pane behaviour.
*/
class AnnotationKeyboardSelectionModifier extends ChartKeyboardModifierBase {
readonly type: string;
constructor(options?: IAnnotationKeyboardModifierOptions);
onAttach(): void;
onDetach(): void;
}
/** Shared options across every chart keyboard modifier (annotation + zoom/pan). */
interface IChartKeyboardModifierOptions extends IChartModifierBaseOptions {
/**
* Pane container element the focus indicator class should be applied to.
* Defaults to `parentSurface.domChartRoot` if not provided.
*/
focusIndicatorElement?: HTMLElement;
}
/** Annotation-keyboard-specific options layered on top of {@link IChartKeyboardModifierOptions}. */
interface IAnnotationKeyboardModifierOptions extends IChartKeyboardModifierOptions {
/**
* Optional callback invoked when the selected annotation changes by
* keyboard. Future inline-toolbar integration subscribes here.
*/
onSelectionChanged?: (annotation: unknown) => void;
/**
* Fires when the user presses `A` to add a new annotation. The
* caller receives the currently-active sub-surface (last-clicked,
* via {@link ChartKeyboardModifierBase.activeSurface}) so the App
* can locate the right pane's placement modifier and re-trigger the
* last-used drawing tool there. Undefined when no pane has been
* clicked yet.
*/
onAddAnnotation?: (activeSurface: unknown) => void;
/**
* Fires when the user presses `Escape`. The modifier always clears
* its own selection state first; this callback gives the App a hook
* to additionally cancel any in-flight placement / freehand drawing
* on the side. Safe to call when nothing is in flight (no-op).
*/
onCancelPlacement?: () => void;
}
/** CSS class applied to the focus-indicator element while the pane is focused. */
const FOCUSED_PANE_CLASS = "st-pane--focused";
The AnnotationTouchSelectionModifier class and its options, with their TSDoc
/** Options for {@link AnnotationTouchSelectionModifier}. */
interface IAnnotationTouchSelectionModifierOptions extends IChartModifierBaseOptions {
/** Long-press duration in ms before selection fires. Default 450. */
holdDurationMs?: number;
/** Cancel-on-move threshold in px. Default 10. */
cancelThresholdPx?: number;
/** Hit-slop radius in px for the long-press hit test. Default 22. */
hitSlopPx?: number;
/**
* Haptic feedback duration in ms (Android / Chrome Vibration API).
* Default 10. Set to 0 to disable. iOS Safari ignores this — no
* cross-browser haptic on iOS without a native bridge.
*/
hapticDurationMs?: number;
}
/**
* Touch-side selection modifier. Two responsibilities:
*
* 1. **Long-press to select + immediately engage drag.** On
* `pointerType === "touch"`, runs a hold timer and selects the first
* annotation under the original pointer after `holdDurationMs`. The
* selection path also synthesises `ModifierMouseArgs` from the stored
* PointerEvent and calls `annotation.onDragStarted(args)` so SciChart's
* `isDraggingStarted` flag flips immediately — that way if the user
* keeps the finger down and starts moving, SciChart's
* `MouseManager.modifierMouseMove` already routes pointermove to
* `onDragAdorner` (annotation drag) instead of `ZoomPanModifier.pan`.
* Pan / x-axis-drag are disabled while the drag is active and restored
* on pointerup. Fires a short haptic via the Vibration API on
* successful selection (no-op on iOS Safari).
*
* 2. **Suppress tap-to-select-different.** SciChart's `MouseManager`
* exposes an {@link isAnnotationInteractionBypassActive} hook (also
* used by the placement / freehand modifiers): when truthy, the
* surface skips `adornerLayer.selectAnnotation()` on pointerdown. We
* return true ONLY when the pointer is on a *different* annotation
* than the currently-selected one. Net effect on touch:
*
* - tap empty area (no selection) → SciChart proceeds, no hit, no-op
* - tap empty area (selection exists) → SciChart proceeds, drags
* nothing, falls through to selectAnnotation → no hit → DESELECTS
* - tap selected annotation's body / grip → bypass off → SciChart's
* clip-area + onDragStarted check engages drag normally
* - tap a non-selected annotation → bypass on → tap-select suppressed
* - long-press on any annotation → select + drag engaged in one go
*
* Mouse / pen input is untouched — `touchInFlight` stays `false` for
* those pointer types and the bypass getter returns `false`, so desktop
* selection works exactly as before.
*/
class AnnotationTouchSelectionModifier extends ChartModifierBase2D {
readonly type: string;
constructor(options?: IAnnotationTouchSelectionModifierOptions);
onAttach(): void;
onDetach(): void;
/**
* SciChart's `MouseManager` reads this on every pointerdown. Returning
* `true` skips `adornerLayer.selectAnnotation()` entirely. We bypass
* ONLY when the pointer is on a non-selected annotation. In every
* other case (empty area / on the currently-selected annotation /
* mouse input) we let SciChart's normal flow run, which handles:
*
* - tap-empty-while-selected → deselect (via selectAnnotation
* loop returning no hit)
* - tap-grip / tap-body of selected → onDragStarted engages
* - mouse input → standard desktop selection
*/
get isAnnotationInteractionBypassActive(): boolean;
}
The OnChartButtonsModifier class and its options, with their TSDoc
/** Options for {@link OnChartButtonsModifier}. */
interface IOnChartButtonsModifierOptions extends IChartModifierBaseOptions {
/**
* When false the modifier still attaches but never adds the host
* annotation.
*/
visible?: boolean;
}
/**
* Chart modifier that hosts the per-pane zoom / pan / reset strip as an
* {@link HtmlCustomAnnotation} pinned to the bottom-centre of the sub-chart
* in relative coordinates (so it doesn't drift with pan/zoom).
*
* Visibility: shown when the cursor is over the pane (SciChart's per-pane
* `modifierMouseEnter` / `modifierMouseMove`), hidden only when the cursor
* leaves the whole chart (`domChartRoot`'s `pointerleave`). Crucially, hide is
* NOT driven by the canvas leaving — so moving the cursor from the canvas onto
* a sibling HTML overlay (this strip, the annotation edit toolbar) does not
* hide it. Toggling is done via the annotation's own `isHidden` property.
*
* Fully framework-free: the modifier builds its own vanilla button strip
* ({@link createOnChartButtonsStrip}) into the host on attach. It exposes:
* - {@link panLeft} / {@link panRight} / {@link zoomIn} / {@link zoomOut} /
* {@link reset} — operations that look up the sibling finance modifiers
* on the same surface ({@link RightPeggedMouseWheelModifier} for pan and
* zoom, {@link FinChartZoomExtentsModifier} for reset) and delegate, so
* the feel matches the wheel / double-click paths exactly.
*/
class OnChartButtonsModifier extends ChartModifierBase2D {
readonly type: string;
constructor(options?: IOnChartButtonsModifierOptions);
/**
* The annotation host the vanilla button strip is built into. Undefined
* while the modifier hasn't been attached yet or `visible` was false at
* construction time. Exposed for tests / advanced callers.
*/
get htmlElement(): HTMLElement | undefined;
onAttach(): void;
onDetach(): void;
/**
* Live toggle for the preference. Adds or removes the host annotation
* to honour `chartInstancePrefs.onChartButtonsVisible` flips without
* requiring a chart re-init.
*/
setVisible(visible: boolean): void;
modifierMouseDown(args: ModifierMouseArgs): void;
modifierMouseEnter(args: ModifierMouseArgs): void;
modifierMouseMove(args: ModifierMouseArgs): void;
modifierPointerCancel(args: ModifierMouseArgs): void;
/**
* Pan the chart left by `deltaPx` pixels. Delegates to the surface's
* {@link RightPeggedMouseWheelModifier} so the motion matches the wheel
* Pan branch (same EClipMode.None, same autoRange handling).
*/
panLeft(deltaPx?: number): void;
/**
* Pan the chart right by `deltaPx` pixels.
*/
panRight(deltaPx?: number): void;
/**
* Zoom in (shrink visible X range, right-edge pegged). Delegates to
* {@link RightPeggedMouseWheelModifier.zoomXBy}.
*/
zoomIn(fraction?: number): void;
/**
* Zoom out (grow visible X range, right-edge pegged).
*/
zoomOut(fraction?: number): void;
/**
* Reset zoom — animates X and Y back to extents. Delegates to
* {@link FinChartZoomExtentsModifier.resetZoom} so the double-click
* and the on-chart "reset" button behave identically.
*/
reset(): void;
}
Where to read next
- Editing Drawings: selection and edit events.
- Add Drawing Tools to a Financial Chart: point-and-click drawing.
- Layout: the panes the modifiers go on.