Constructors

Properties

base: CanvasLayer
element: HTMLElement
priceScale: PriceScale = ...
top: CanvasLayer
weight: number = 1

Relative height weight within the chart (price=1, volume≈0.3).

Methods

  • Parameters

    • record: SeriesRecord

    Returns void

  • Autoscale each active price scale from its own series (independent axes).

    Parameters

    • ctx: PaneRenderContext

    Returns void

  • Detach every primitive (lifecycle cleanup) and remove the pane element.

    Returns void

  • True when a left-axis scale is active (some series maps to it).

    Returns boolean

  • Topmost primitive hit at media-px (x,y) relative to this pane's plot.

    Parameters

    • x: number
    • y: number
    • ctx: PaneRenderContext

    Returns null | PrimitiveHit

  • Paint background + grid + series + axes on the base canvas.

    Parameters

    • ctx: PaneRenderContext

    Returns void

  • Top (overlay) canvas: top-layer primitives + crosshair. Cheap repaint on cursor moves. cross.x is the shared plot x (vertical line, drawn in every pane for a global crosshair); cross.yLocal is the price-line y for the hovered pane only (null elsewhere); cross.showTimeTag draws the date tag on the bottom pane's axis strip.

    Parameters

    • cross: null | { showTimeTag: boolean; x: number; yLocal: null | number }
    • ctx: PaneRenderContext

    Returns void

  • Remove a series record if present; returns true if it was found.

    Parameters

    • record: SeriesRecord

    Returns boolean

  • Parameters

    • width: number
    • height: number
    • dpr: number

    Returns void

  • Give every scale on this pane its plot height. Height is a layout property, but it used to be set only inside the autoscale pass — so any y↔price conversion before the first paint divided by zero and returned ±Infinity. Layout is when the height is actually known.

    Parameters

    • plotHeight: number

    Returns void

  • Price at a media-px y on this pane (for crosshair magnet).

    Parameters

    • y: number

    Returns number