interface PriceScaleState {
    autoScale: boolean;
    fixedRange?: null | { max: number; min: number };
    indicatorRange?: { instanceId: string; manual: boolean };
    inverted: boolean;
    marginBottom: number;
    marginTop: number;
    minMove: number;
    minPrecision?: number;
    mode: PriceScaleMode;
    placement?: PriceAxisPlacement;
    range?: { max: number; min: number };
    ratioLock?: { barSpacing: number; height: number };
}

Properties

autoScale: boolean

False when the user (or an indicator's fixed range) pinned the scale.

fixedRange?: null | { max: number; min: number }

The declared auto-fit band, independent of a temporary manual range.

indicatorRange?: { instanceId: string; manual: boolean }

Study default ownership; manual records a host view override without losing the default.

inverted: boolean
marginBottom: number
marginTop: number
minMove: number
minPrecision?: number

Optional in older snapshots, which used the current scale's precision floor.

placement?: PriceAxisPlacement

Independent axis side and order. Omission restores the scale identity's default placement.

range?: { max: number; min: number }

The pinned range, present only when autoScale is false.

ratioLock?: { barSpacing: number; height: number }

Geometry paired with the saved range, so reopening at another size preserves its proportion.