Every event on the chart's bus, by name, with the payload a listener receives. chart.on, once and off take these names and type the listener from here; the draw tier adds the draw:* and drawing:* names. Add a name of your own by declaration merging (see the module note).

interface ChartEventMap {
    "alert:created": AlertChangeEvent;
    "alert:error": AlertErrorEvent;
    "alert:expired": AlertChangeEvent;
    "alert:removed": AlertRemovedEvent;
    "alert:triggered": AlertTriggeredPayload;
    "alert:updated": AlertChangeEvent;
    "alerts:changed": AlertsChangedEvent;
    "alerts:checkpoint": EmptyEvent;
    "alerts:restore": AlertsDocument;
    "alerts:restored": AlertsRestoredEvent;
    "branding:changed": BrandingChangedEvent;
    chartType: string | { chartType: string };
    click: ChartClickEvent;
    contextmenu: ContextMenuEvent;
    "crosshair:move": CrosshairMoveEvent;
    "crosshair:readout": CrosshairMoveEvent;
    "data:context": undefined | Readonly<ChartDataContext>;
    "data:range": EmptyEvent;
    "data:requests": EmptyEvent;
    "data:update": ChartDataUpdate;
    dblclick: DoubleClickEvent;
    destroy: EmptyEvent;
    drag: ChartDragEvent;
    "drag:cancel": ChartDragCancelEvent;
    "drag:end": ChartDragEndEvent;
    "drag:start": ChartDragEndEvent;
    "draw:add": DrawingEvent;
    "draw:copy": DrawingListEvent;
    "draw:cut": DrawingListEvent;
    "draw:destroy": { controller: DrawingController };
    "draw:eraser": DrawingModeEvent;
    "draw:measure": DrawingModeEvent;
    "draw:paste": DrawingListEvent;
    "draw:preview": DrawingListEvent;
    "draw:preview-clear": DrawingIdsEvent;
    "draw:remove": DrawingEvent;
    "draw:restore": EmptyEvent;
    "draw:select": DrawingIdEvent;
    "draw:tool": DrawingToolEvent;
    "draw:update": DrawingEvent;
    "drawing:change": DrawingChangeEvent;
    "drawing:hover": DrawingIdEvent;
    "drawing:select": DrawingIdsEvent;
    "drawings:restore": unknown;
    "event:click": ChartEventClick;
    "events:change": undefined;
    hover: ChartHoverEvent;
    "indicator:alert": IndicatorAlertPayload;
    "indicator:data-status": IndicatorDataStatusEvent;
    indicatorRemoved: IndicatorInstanceEvent;
    indicatorSettings: IndicatorInstanceEvent;
    indicatorSource: IndicatorInstanceEvent;
    interval: string | { interval: string };
    "layout:change": LayoutChangeEvent;
    "lazy-load": LazyLoadEvent;
    "objects:change": EmptyEvent;
    pan: ChartViewportEvent;
    paneAdded: PaneEvent;
    paneCollapsed: PaneCollapsedEvent;
    paneMaximized: PaneMaximizedEvent;
    paneMoved: PaneMovedEvent;
    paneRemoved: PaneEvent;
    paneResized: PaneEvent;
    "pick:end": PickEndEvent;
    "pick:start": PickStartEvent;
    priceAxisMoved: {
        from: "left" | "right";
        paneIndex: number;
        to: "left" | "right";
    };
    priceAxisPlacementChanged: PriceAxisPlacementChangedEvent;
    ready: EmptyEvent;
    "renderer:fallback": RendererFallbackEvent;
    "replay:end": ReplayState;
    "replay:frame": ReplayState;
    "replay:pause": ReplayState;
    "replay:play": ReplayState;
    "replay:start": ReplayState;
    "replay:stop": ReplayState;
    resize: ChartResizeEvent;
    "state:restore:end": EmptyEvent;
    "state:restore:start": EmptyEvent;
    "style:change": LinkAppearanceValues;
    symbol: string
    | { exchange?: string; symbol: string };
    "timezone:changed": TimezoneChangedEvent;
    "trading:bracket_modify": TradingBracketModifyEvent;
    "trading:order_cancel": { orderId: string };
    "trading:order_click": { order: TradingOrder };
    "trading:order_modify": TradingOrderModifyEvent;
    "trading:position_click": { position: TradingPosition };
    "trading:position_close": { positionId: string };
    zoom: ChartViewportEvent;
}

Properties

"alert:created": AlertChangeEvent
"alert:error": AlertErrorEvent
"alert:expired": AlertChangeEvent
"alert:removed": AlertRemovedEvent
"alert:triggered": AlertTriggeredPayload
"alert:updated": AlertChangeEvent
"alerts:changed": AlertsChangedEvent
"alerts:checkpoint": EmptyEvent

Evaluation advanced what the alerts have consumed; save the chart state, deliver nothing.

"alerts:restore": AlertsDocument

The alerts a restore carries, for an AlertController to load.

"alerts:restored": AlertsRestoredEvent
"branding:changed": BrandingChangedEvent

The brand mark changed; the payload is its options, or false when it was removed.

chartType: string | { chartType: string }

The host switched chart type. A link group follows it.

contextmenu: ContextMenuEvent

A right click, axis strips included. Call preventDefault to show your own menu.

"crosshair:move": CrosshairMoveEvent

The pointer moved over the plot, or left it (every field null).

"crosshair:readout": CrosshairMoveEvent

Every crosshair position a readout should show: the pointer's, and a linked chart's (source: 'linked').

"data:context": undefined | Readonly<ChartDataContext>

setDataContext changed the instrument, interval or variant; the payload is the new context.

"data:range": EmptyEvent

Studies were invalidated because the primary bars or the clock they read changed; a write fires it before data:update.

"data:requests": EmptyEvent

setBarsProvider or invalidateRequestedData ran; studies that fetch ask again.

"data:update": ChartDataUpdate

The primary source was written: a live bar, a reset or a page of history.

Set handled to stop the chart's own double-click action.

destroy: EmptyEvent

Once, at the end of destroy(), with the chart already torn down. Every listener is dropped after it.

"drag:cancel": ChartDragCancelEvent
"drag:end": ChartDragEndEvent
"drag:start": ChartDragEndEvent

A press on a draggable primitive, before it moves.

"draw:add": DrawingEvent

A drawing was created, once per drawing.

"draw:copy": DrawingListEvent

A copy reached the clipboard (copies, not the live drawings).

"draw:cut": DrawingListEvent

A cut wrote to the clipboard and then deleted.

"draw:destroy": { controller: DrawingController }

A controller was destroyed and let go of the chart.

"draw:eraser": DrawingModeEvent

The eraser was switched on or off.

"draw:measure": DrawingModeEvent

The measure gesture started or ended.

"draw:paste": DrawingListEvent

The drawings a paste created, after their own draw:add.

"draw:preview": DrawingListEvent

Where a drag is carrying drawings, before it commits (copies).

"draw:preview-clear": DrawingIdsEvent

A drag preview ended, committed or not.

"draw:remove": DrawingEvent

A drawing was deleted, once per drawing.

"draw:restore": EmptyEvent

fromJSON or a chart restore replaced every drawing.

"draw:select": DrawingIdEvent

The selection changed; id is the primary (first picked) id. Fires with drawing:select.

"draw:tool": DrawingToolEvent

A drawing tool became active, or none is (tool: null).

"draw:update": DrawingEvent

A drawing's anchors, style, text or flags changed, once per drawing.

"drawing:change": DrawingChangeEvent

One per mutation, after the per-drawing draw:* events.

"drawing:hover": DrawingIdEvent

The unselected drawing under the pointer changed.

"drawing:select": DrawingIdsEvent

The whole selection, when it changed.

"drawings:restore": unknown

The drawings a restore carries, for the draw tier to load. Opaque to the base.

"event:click": ChartEventClick

A timeline event marker was clicked.

"events:change": undefined

Chart-owned timeline events, or their visibility, changed.

The pointer entered or left a hit-testable primitive.

"indicator:alert": IndicatorAlertPayload

A condition a study descriptor declared came true on a live bar.

"indicator:data-status": IndicatorDataStatusEvent
indicatorRemoved: IndicatorInstanceEvent
indicatorSettings: IndicatorInstanceEvent

A study legend's settings button was pressed. The engine ships no form.

indicatorSource: IndicatorInstanceEvent

A study legend's source button was pressed (a descriptor with hasSource: true).

interval: string | { interval: string }

The host switched timeframe. A link group follows it.

"layout:change": LayoutChangeEvent

A setter that changes the saved layout, and has no event of its own, ran.

"lazy-load": LazyLoadEvent

The view neared the oldest bar and the history loader ran.

"objects:change": EmptyEvent

The source, study or chart object inventory changed. Re-read it; the payload says nothing.

The visible window moved without changing its span.

paneAdded: PaneEvent
paneCollapsed: PaneCollapsedEvent
paneMaximized: PaneMaximizedEvent
paneMoved: PaneMovedEvent
paneRemoved: PaneEvent
paneResized: PaneEvent

A pane divider drag was released.

"pick:end": PickEndEvent

A pick resolved or was cancelled.

"pick:start": PickStartEvent

beginPick started.

priceAxisMoved: {
    from: "left" | "right";
    paneIndex: number;
    to: "left" | "right";
}

movePriceAxis moved a pane's prices to the other strip.

Removed in 3.0.0 with movePriceAxis, the only call that emits it. Listen for priceAxisPlacementChanged (since 2.5.4).

priceAxisPlacementChanged: PriceAxisPlacementChangedEvent
ready: EmptyEvent

Once, on the microtask after the chart is built, so a listener added on the next line still hears it.

"renderer:fallback": RendererFallbackEvent

A GPU backend lost its context or proved unusable; every pane draws through canvas2d from now on.

"replay:end": ReplayState
"replay:frame": ReplayState
"replay:pause": ReplayState
"replay:play": ReplayState
"replay:start": ReplayState
"replay:stop": ReplayState

The container size changed, by the resize observer or an applySize that changed it.

"state:restore:end": EmptyEvent
"state:restore:start": EmptyEvent

restoreState began. A listener may start a newer restore, which supersedes this one.

"style:change": LinkAppearanceValues

Appearance settings a link group mirrors were applied, as the values that changed.

symbol: string | { exchange?: string; symbol: string }

The host switched instrument. The widget emits it; a link group and a drawing link follow it.

"timezone:changed": TimezoneChangedEvent
"trading:bracket_modify": TradingBracketModifyEvent
"trading:order_cancel": { orderId: string }
"trading:order_click": { order: TradingOrder }
"trading:order_modify": TradingOrderModifyEvent
"trading:position_click": { position: TradingPosition }
"trading:position_close": { positionId: string }

The visible window's span changed.