Constructors

Accessors

  • get autoScale(): boolean
  • Whether the range tracks the data (true) or has been set manually (false).

    Returns boolean

Methods

  • Recompute the visible range from data extremes + configured margins.

    Parameters

    • low: number
    • high: number

    Returns void

  • Clamp a y to the pane (used by crosshair/order dragging).

    Parameters

    • y: number

    Returns number

  • Format a price for axis/label display.

    Parameters

    • price: number

    Returns string

  • Pan the visible range vertically by dy media px (dragging the plot up/down). Works in transformed space so it's correct for log scales, and respects inverted. Switches to manual mode so autoscale stops overriding it.

    Parameters

    • dy: number

    Returns void

  • Decimal precision implied by minMove (or the visible range if unset).

    Returns number

  • Price → y (media px). Higher price → smaller y (top of pane), unless inverted.

    Parameters

    • price: number

    Returns number

  • Manually scale the visible range around its centre. factor > 1 widens the range (compress / zoom out), < 1 narrows it (expand / zoom in). Switches the scale to manual mode so autoscale stops overriding it.

    Parameters

    • factor: number

    Returns void

  • Override the numeric formatting used for axis tick labels, the last-price tag, and price-line labels (e.g. a currency or percent format). Pass null to restore the default tick-size-aware toFixed.

    Parameters

    • fn: null | (price: number) => string

    Returns void

  • Snap a price to the instrument tick size (no-op if minMove is 0).

    Parameters

    • price: number

    Returns number