Interface DrawingLinkChart

interface DrawingLinkChart {
    isDestroyed?: boolean;
    getDataContext(): undefined | Readonly<DrawingLinkContext>;
    on(event: string, handler: (payload: unknown) => void): () => void;
    primaryPaneIndex(): number;
}

Hierarchy

Properties

isDestroyed?: boolean

Methods

  • The event bus, with the names and payloads of ChartEventMap. The controller listens for click, crosshair:move, drag, drag:end, drag:cancel, dblclick and hover ({ id }, the hit id under the pointer whenever it changes), which is what drives the hover state: the chart has already hit-tested the move, so the controller reads its answer rather than testing a second time. A host that never emits hover has drawings that select and drag but do not light up. It also follows data:context, drawings:restore, pick:start, pick:end, paneRemoved, paneMoved, objects:change and indicatorRemoved; a host that moves or removes panes without paneRemoved and paneMoved leaves drawings on the old slots. It emits the draw:* and drawing:* names this tier adds to ChartEventMap.

    Parameters

    • event: string
    • handler: (payload: unknown) => void

    Returns () => void

  • Optional. Slot of the price pane, the one pane whose drawings the magnet snaps to candle prices and a drawing link shares. It moves when a host puts the price pane below its studies; without it the price pane is slot 0.

    Returns number