<!-- Public documentation export; not library implementation source. -->
# IChartWidgetApi

[Integration guide](https://docs.lumencharts.com/charting-library/reference/events) · [Reference index](https://docs.lumencharts.com/charting-library/api/)

Runtime facade. Entries identify whether the current source exposes each member. Optional provider-dependent methods still require their configured capability.

Commands and events for one chart in the widget. Get it from `widget.activeChart()` or `widget.chart(index)` after `onChartReady`.

## automationAvailable {#automationavailable}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
automationAvailable(): boolean;
```

Whether the optional automation asset has been installed in this chart's iframe.

## openAutomation {#openautomation}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
openAutomation(options?: OpenChartAutomationOptions): Promise<ChartAutomation>;
```

Opens an automation session for this chart: loads the optional automation asset when needed,
installs the requested native command families and wires exact-chart PNG capture.
Close the session when done; removing the chart closes it.

| Parameter | Type | Required |
| --- | --- | --- |
| `options` | `OpenChartAutomationOptions` | No |

## createDrawingDocument {#createdrawingdocument}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createDrawingDocument(binding: ChartBinding): ChartDrawingDocumentApi;
```

Native persistence remains available without the automation add-on.

| Parameter | Type | Required |
| --- | --- | --- |
| `binding` | `ChartBinding` | Yes |

## createStudyDocument {#createstudydocument}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createStudyDocument(binding: ChartBinding, options: { chartId: string; documentId: string; revision: number }): ChartStudyDocumentApi;
```

Creates a study-document owner bound to this chart that exports, restores and commits the chart's studies and pane layout as a versioned document identified by `chartId`, `documentId` and `revision`. You own its lifetime; it is destroyed when the chart is removed, and creating one on a removed chart throws.

| Parameter | Type | Required |
| --- | --- | --- |
| `binding` | `ChartBinding` | Yes |
| `options` | `{ chartId: string; documentId: string; revision: number }` | Yes |

## footprintStatus {#footprintstatus}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
footprintStatus(): FootprintStatus;
```

**Beta.** Status of the volume footprint data for this chart.

## onFootprintStatusChanged {#onfootprintstatuschanged}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onFootprintStatusChanged(): ISubscription<(status: FootprintStatus) => void>;
```

**Beta.** Fires when the volume footprint status changes.

## onDataChanged {#ondatachanged}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onDataChanged(): ISubscription<() => void>;
```

Committed main-series data changes, including realtime updates.

## onRemoved {#onremoved}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onRemoved(listener: () => void): () => void;
```

Fires once on chart removal; returns an unsubscribe function.

| Parameter | Type | Required |
| --- | --- | --- |
| `listener` | `() => void` | Yes |

## readLoadedBars {#readloadedbars}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
readLoadedBars(input: { from: number; to: number; limit?: number }): {
    bars: Array<{ time: number; open: number; high: number; low: number; close: number; volume?: number }>;
    coverage: { from: number | null; to: number | null; complete: boolean };
  };
```

Bounded raw loaded candles. All times are UTC epoch milliseconds. No add-on required.

| Parameter | Type | Required |
| --- | --- | --- |
| `input` | `{ from: number; to: number; limit?: number }` | Yes |

## onDataLoaded {#ondataloaded}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onDataLoaded(): ISubscription<() => void>;
```

Returns a subscription that fires each time the main series finishes loading without an error.

## dataStatus {#datastatus}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
dataStatus(): ChartDataStatus;
```

Whether the main series has data to show, with a plain-language reason when loading failed.
Hosts that disable the `series_data_error_overlay` feature use this to present data errors themselves.

## onDataStatusChanged {#ondatastatuschanged}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onDataStatusChanged(): ISubscription<(status: ChartDataStatus) => void>;
```

Returns a subscription that fires with the new `dataStatus()` value whenever its state or message changes.

## datafeedStatus {#datafeedstatus}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
datafeedStatus(): ChartDatafeedConnectionStatus;
```

Realtime connection state of this chart's datafeed. `idle` until a datafeed session starts.
Hosts can show a short "Reconnecting" notice for `reconnecting` and clear it on `live`.

## onDatafeedStatusChanged {#ondatafeedstatuschanged}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onDatafeedStatusChanged(): ISubscription<(status: ChartDatafeedConnectionStatus) => void>;
```

Returns a subscription that fires with the new datafeed connection status whenever its state or retry attempt changes.

## onSymbolChanged {#onsymbolchanged}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onSymbolChanged(): ISubscription<() => void>;
```

Returns a subscription that fires, with no arguments, whenever the chart's symbol changes.

## onIntervalChanged {#onintervalchanged}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onIntervalChanged(): ISubscription<
    (
      interval: ResolutionString,
      timeFrameParameters: {
        timeframe?: TimeFrameValue;
      },
    ) => void
  >;
```

Returns a subscription that fires with the new resolution whenever the chart's interval changes. The second argument's `timeframe` is always `undefined`.

## onVisibleRangeChanged {#onvisiblerangechanged}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onVisibleRangeChanged(): ISubscription<(range: VisibleTimeRange) => void>;
```

Returns a subscription that fires with the new visible time range whenever the chart scrolls or zooms.

## onChartTypeChanged {#oncharttypechanged}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
onChartTypeChanged(): ISubscription<(chartType: SeriesType) => void>;
```

Returns a subscription that fires with the new series type whenever the chart type changes.

## dataReady {#dataready}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
dataReady(callback?: () => void): boolean;
```

Returns `true` when the main series is neither loading nor in error. If `callback` is given, calls it immediately when ready, otherwise after the current load completes.

| Parameter | Type | Required |
| --- | --- | --- |
| `callback` | `() => void` | No |

## crossHairMoved {#crosshairmoved}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
crossHairMoved(): ISubscription<(params: CrossHairMovedEventParams) => void>;
```

Returns a subscription that fires with the crosshair position each time the user moves it over the chart; programmatic moves from `setExternalCrosshair` do not fire it.

## setExternalCrosshair {#setexternalcrosshair}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
setExternalCrosshair(point: { time: number; price: number } | null): void;
```

Position the chart crosshair at a time and price, or clear a previously positioned crosshair.

**point:** The time and price to focus, or `null` to clear the crosshair.

| Parameter | Type | Required |
| --- | --- | --- |
| `point` | `{ time: number; price: number } &#124; null` | Yes |

**Failure conditions:** `Crosshair point must contain finite time and price values`.

## onHoveredSourceChanged {#onhoveredsourcechanged}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
onHoveredSourceChanged(): ISubscription<(sourceId: EntityId) => void>;
```

Use the type signature above and the integration guide for the owning capability.

## setVisibleRange {#setvisiblerange}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
setVisibleRange(
    range: SetVisibleTimeRange,
    options?: SetVisibleRangeOptions,
  ): Promise<void>;
```

Scrolls and zooms the time scale to show the given range and resolves once it is applied. `percentRightMargin` adds empty space on the right, and `loadedOnly` keeps the range within loaded bars without requesting more history.

| Parameter | Type | Required |
| --- | --- | --- |
| `range` | `SetVisibleTimeRange` | Yes |
| `options` | `SetVisibleRangeOptions` | No |

## setSymbol {#setsymbol}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
setSymbol(symbol: string, options?: SetSymbolOptions | (() => void)): void;
```

Changes the chart's symbol and activates the chart unless `doNotActivateChart` is set. A callback runs after the new data finishes loading, or on the next microtask when the symbol is unchanged.

| Parameter | Type | Required |
| --- | --- | --- |
| `symbol` | `string` | Yes |
| `options` | `SetSymbolOptions &#124; (() => void)` | No |

## setResolution {#setresolution}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
setResolution(
    resolution: ResolutionString,
    options?: SetResolutionOptions | (() => void),
  ): Promise<boolean>;
```

Changes the chart's interval, or every chart's interval when the interval lock is on, and activates the chart unless `doNotActivateChart` is set. Resolves `true` immediately for an unsupported or unchanged resolution, otherwise whether any chart changed; `dataReady` runs after the main series finishes loading.

| Parameter | Type | Required |
| --- | --- | --- |
| `resolution` | `ResolutionString` | Yes |
| `options` | `SetResolutionOptions &#124; (() => void)` | No |

## setChartType {#setcharttype}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
setChartType(type: SeriesType, callback?: () => void): void;
```

Changes the main series style and calls `callback` after the series data finishes loading. Throws for an unsupported style, and for volume footprint unless the `chart_style_volume_footprint` feature is enabled.

| Parameter | Type | Required |
| --- | --- | --- |
| `type` | `SeriesType` | Yes |
| `callback` | `() => void` | No |

**Failure conditions:** `Volume footprint requires the chart_style_volume_footprint feature`.

## resetCache {#resetcache}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
resetCache(): void;
```

Reset cached bar data for this chart's active datafeed session.

## resetData {#resetdata}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
resetData(): void;
```

Purges the cached history for this chart and reloads it from the datafeed, keeping the visible range.

## executeActionById {#executeactionbyid}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
executeActionById(actionId: ChartActionId): void;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `actionId` | `ChartActionId` | Yes |

## getCheckableActionState {#getcheckableactionstate}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
getCheckableActionState(actionId: ChartActionId): boolean;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `actionId` | `ChartActionId` | Yes |

## refreshMarks {#refreshmarks}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
refreshMarks(): void;
```

Discards the loaded bar and timescale marks and requests them again from the datafeed for the current range.

## clearMarks {#clearmarks}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
clearMarks(marksToClear?: ClearMarksMode): void;
```

Removes bar marks, timescale marks or both (the default) without requesting them again for the current range. Throws a `RangeError` for an unknown mode.

| Parameter | Type | Required |
| --- | --- | --- |
| `marksToClear` | `ClearMarksMode` | No |

## getAllShapes {#getallshapes}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
getAllShapes(): EntityInfo[];
```

Returns the id and name of every drawing on the chart.

## getAllStudies {#getallstudies}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
getAllStudies(): EntityInfo[];
```

Returns the id and name of every study on the chart.

## getPriceToBarRatio {#getpricetobarratio}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
getPriceToBarRatio(): number | null;
```

Returns the current price-to-bar ratio of the main price scale, or `null` when it cannot be computed.

## setPriceToBarRatio {#setpricetobarratio}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
setPriceToBarRatio(ratio: number, options?: UndoOptions): void;
```

Sets the price-to-bar ratio of the main price scale, recording an Undo step unless `disableUndo` is set.

| Parameter | Type | Required |
| --- | --- | --- |
| `ratio` | `number` | Yes |
| `options` | `UndoOptions` | No |

## isPriceToBarRatioLocked {#ispricetobarratiolocked}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
isPriceToBarRatioLocked(): boolean;
```

Returns whether the main price scale's price-to-bar ratio is locked.

## setPriceToBarRatioLocked {#setpricetobarratiolocked}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
setPriceToBarRatioLocked(value: boolean, options?: UndoOptions): void;
```

Locks or unlocks the price-to-bar ratio, recording an Undo step unless `disableUndo` is set. Locking switches the price scale to regular mode and keeps the current ratio.

| Parameter | Type | Required |
| --- | --- | --- |
| `value` | `boolean` | Yes |
| `options` | `UndoOptions` | No |

## getAllPanesHeight {#getallpanesheight}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
getAllPanesHeight(): number[];
```

Use the type signature above and the integration guide for the owning capability.

## setAllPanesHeight {#setallpanesheight}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
setAllPanesHeight(heights: readonly number[]): void;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `heights` | `readonly number[]` | Yes |

## maximizeChart {#maximizechart}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
maximizeChart(): void;
```

Activates this chart and maximizes it within a multi-chart layout; has no effect when the chart is not visible in the layout.

## isMaximized {#ismaximized}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
isMaximized(): boolean;
```

Returns whether this chart is currently maximized in the layout.

## restoreChart {#restorechart}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
restoreChart(): void;
```

Restores the layout from a maximized chart so all charts are shown again.

## availableZOrderOperations {#availablezorderoperations}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
availableZOrderOperations(
    sources: readonly EntityId[],
  ): AvailableZOrderOperations;
```

Returns which z-order operations can be applied to the given drawings, with every operation disabled when none apply.

| Parameter | Type | Required |
| --- | --- | --- |
| `sources` | `readonly EntityId[]` | Yes |

## sendToBack {#sendtoback}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
sendToBack(entities: readonly EntityId[]): void;
```

Moves the given drawings beneath all other drawings.

| Parameter | Type | Required |
| --- | --- | --- |
| `entities` | `readonly EntityId[]` | Yes |

## bringToFront {#bringtofront}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
bringToFront(sources: readonly EntityId[]): void;
```

Moves the given drawings above all other drawings.

| Parameter | Type | Required |
| --- | --- | --- |
| `sources` | `readonly EntityId[]` | Yes |

## bringForward {#bringforward}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
bringForward(sources: readonly EntityId[]): void;
```

Moves the given drawings one step up in the drawing order.

| Parameter | Type | Required |
| --- | --- | --- |
| `sources` | `readonly EntityId[]` | Yes |

## sendBackward {#sendbackward}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
sendBackward(sources: readonly EntityId[]): void;
```

Moves the given drawings one step down in the drawing order.

| Parameter | Type | Required |
| --- | --- | --- |
| `sources` | `readonly EntityId[]` | Yes |

## createStudy {#createstudy}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createStudy<TOverrides extends Partial<SingleIndicatorOverrides>>(
    name: string,
    forceOverlay?: boolean,
    lock?: boolean,
    inputs?: Record<string, StudyInputValue>,
    overrides?: TOverrides,
    options?: CreateStudyOptions,
  ): Promise<EntityId | null>;
```

Adds the built-in study whose display name matches `name` (case-insensitive), merged with saved defaults, and resolves to its entity id or `null` when it could not be added. Throws when no study has that name; with `checkLimit`, resolves `null` once the study limit is reached.

| Parameter | Type | Required |
| --- | --- | --- |
| `name` | `string` | Yes |
| `forceOverlay` | `boolean` | No |
| `lock` | `boolean` | No |
| `inputs` | `Record<string, StudyInputValue>` | No |
| `overrides` | `TOverrides` | No |
| `options` | `CreateStudyOptions` | No |

**Failure conditions:** `Study '${studyName}' is unavailable`.

## compilePineScript {#compilepinescript}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
compilePineScript(
    source: string,
    options?: PineScriptRunOptions,
  ): Promise<PineScriptCompileResult>;
```

Compiles Pine Script source against the chart's current bars without adding a study and resolves with the compile result. Rejects unless Pine Script is enabled in the `pine_script` widget option.

| Parameter | Type | Required |
| --- | --- | --- |
| `source` | `string` | Yes |
| `options` | `PineScriptRunOptions` | No |

## createPineStudy {#createpinestudy}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
createPineStudy(
    source: string,
    options?: PineScriptStudyOptions,
  ): Promise<EntityId | null>;
```

Compiles the source and adds it to the chart as a Pine study, resolving to its entity id or `null` when it could not be added. Rejects on compile errors or when Pine Script is disabled.

| Parameter | Type | Required |
| --- | --- | --- |
| `source` | `string` | Yes |
| `options` | `PineScriptStudyOptions` | No |

## updatePineStudy {#updatepinestudy}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
updatePineStudy(
    entityId: EntityId,
    source: string,
    options?: PineScriptStudyOptions,
  ): Promise<void>;
```

Recompiles an existing Pine study with new source, carrying over compatible inputs and overrides. Rejects when the entity is missing or not a Pine study, on compile errors, or when a newer update supersedes this one.

| Parameter | Type | Required |
| --- | --- | --- |
| `entityId` | `EntityId` | Yes |
| `source` | `string` | Yes |
| `options` | `PineScriptStudyOptions` | No |

## getPineStudy {#getpinestudy}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
getPineStudy(entityId: EntityId): PineScriptStudyState | null;
```

Returns a copy of a Pine study's descriptor, inputs, overrides, pane, status, error and alert conditions, or `null` when the entity is not a Pine study.

| Parameter | Type | Required |
| --- | --- | --- |
| `entityId` | `EntityId` | Yes |

## createPineAlertRule {#createpinealertrule}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
createPineAlertRule(input: PineAlertRuleInput): PineAlertRule;
```

Creates an alert rule on one of a Pine study's alert conditions and returns it with its generated id. Throws when Pine alerts are disabled (`pine_script.alerts`) or the study does not declare that condition.

| Parameter | Type | Required |
| --- | --- | --- |
| `input` | `PineAlertRuleInput` | Yes |

**Failure conditions:** `Pine alerts are unavailable`.

## updatePineAlertRule {#updatepinealertrule}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
updatePineAlertRule(
    id: string,
    patch: Partial<PineAlertRuleInput>,
  ): PineAlertRule;
```

Applies `patch` to an existing Pine alert rule and returns the updated rule. Throws when alerts are disabled, the rule does not exist, or the target condition is missing.

| Parameter | Type | Required |
| --- | --- | --- |
| `id` | `string` | Yes |
| `patch` | `Partial<PineAlertRuleInput>` | Yes |

**Failure conditions:** `Pine alerts are unavailable`.

## removePineAlertRule {#removepinealertrule}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
removePineAlertRule(id: string): boolean;
```

Removes a Pine alert rule and returns whether one was removed. Throws when Pine alerts are disabled.

| Parameter | Type | Required |
| --- | --- | --- |
| `id` | `string` | Yes |

## getPineAlertRules {#getpinealertrules}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
getPineAlertRules(): PineAlertRule[];
```

Returns copies of all Pine alert rules on this chart.

## getPineAlertHistory {#getpinealerthistory}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
getPineAlertHistory(): PineAlertEvent[];
```

Returns copies of the Pine alert events fired so far, keeping at most `pine_script.max_alert_events` (500 by default).

## subscribePineAlertEvents {#subscribepinealertevents}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
subscribePineAlertEvents(
    listener: (event: PineAlertEvent) => void,
  ): () => void;
```

Calls `listener` with each Pine alert event as it fires and returns a function that unsubscribes. Throws a `TypeError` when `listener` is not a function.

| Parameter | Type | Required |
| --- | --- | --- |
| `listener` | `(event: PineAlertEvent) => void` | Yes |

**Failure conditions:** `Pine alert listener must be a function`.

## getPineStrategyReport {#getpinestrategyreport}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
getPineStrategyReport(studyId: EntityId): PineStrategyReport | null;
```

Returns a frozen copy of a Pine strategy's latest backtest report, or `null` before one is available. Throws when the study does not exist, is not a Pine study, or is not a strategy.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |

**Failure conditions:** `Pine strategies are unavailable`.

## getPineStudyObject {#getpinestudyobject}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
getPineStudyObject(
    studyId: EntityId,
    objectId: string,
  ): PineStudyObjectSnapshot | null;
```

Returns a frozen snapshot of one drawing object (such as a line, label or box) produced by a Pine study, or null when the study has no object with that id. Throws when the entity is not a Pine study.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |
| `objectId` | `string` | Yes |

**Failure conditions:** `Pine object inspection is unavailable`.

## getPineStudyObjects {#getpinestudyobjects}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
getPineStudyObjects(studyId: EntityId): readonly PineStudyObjectSnapshot[];
```

Returns frozen snapshots of all drawing objects the Pine study produced in its latest run. Throws when the entity is missing or is not a Pine study.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |

**Failure conditions:** `Pine object inspection is unavailable`.

## listPineWorkspaceDocuments {#listpineworkspacedocuments}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
listPineWorkspaceDocuments(
    request?: PineWorkspaceListRequest,
    options?: PineScriptRunOptions,
  ): Promise<PineWorkspacePage>;
```

Lists one page of Pine documents from the configured `pine_script.workspace_provider`, up to 50 per page by default. Rejects when no workspace provider is configured or the provider returns an invalid page; pass `options.signal` to abort.

| Parameter | Type | Required |
| --- | --- | --- |
| `request` | `PineWorkspaceListRequest` | No |
| `options` | `PineScriptRunOptions` | No |

## loadPineWorkspaceDocument {#loadpineworkspacedocument}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
loadPineWorkspaceDocument(
    id: string,
    options?: PineScriptRunOptions,
  ): Promise<PineWorkspaceDocument>;
```

Loads a Pine document, including its source, from the configured workspace provider. Rejects when no provider is configured, the id is empty, or the provider returns a different document.

| Parameter | Type | Required |
| --- | --- | --- |
| `id` | `string` | Yes |
| `options` | `PineScriptRunOptions` | No |

## createPineWorkspaceDocument {#createpineworkspacedocument}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
createPineWorkspaceDocument(
    request: PineWorkspaceCreateRequest,
    options?: PineScriptRunOptions,
  ): Promise<PineWorkspaceDocument>;
```

Creates a Pine document through the configured workspace provider and resolves with the stored document. Rejects when no provider is configured or the source is empty or larger than 256 KB.

| Parameter | Type | Required |
| --- | --- | --- |
| `request` | `PineWorkspaceCreateRequest` | Yes |
| `options` | `PineScriptRunOptions` | No |

## updatePineWorkspaceDocument {#updatepineworkspacedocument}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
updatePineWorkspaceDocument(
    request: PineWorkspaceUpdateRequest,
    options?: PineScriptRunOptions,
  ): Promise<PineWorkspaceDocument>;
```

Saves new source to an existing Pine document through the configured workspace provider and resolves with the updated document. The request must include `expectedRevision`, which the provider can use to reject conflicting writes.

| Parameter | Type | Required |
| --- | --- | --- |
| `request` | `PineWorkspaceUpdateRequest` | Yes |
| `options` | `PineScriptRunOptions` | No |

## deletePineWorkspaceDocument {#deletepineworkspacedocument}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
deletePineWorkspaceDocument(
    id: string,
    expectedRevision: string,
    options?: PineScriptRunOptions,
  ): Promise<void>;
```

Deletes a Pine document through the configured workspace provider, passing `expectedRevision` so the provider can refuse a stale delete. Rejects when no provider is configured or either argument is empty.

| Parameter | Type | Required |
| --- | --- | --- |
| `id` | `string` | Yes |
| `expectedRevision` | `string` | Yes |
| `options` | `PineScriptRunOptions` | No |

## listPineWorkspaceRevisions {#listpineworkspacerevisions}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
listPineWorkspaceRevisions(
    request: PineWorkspaceRevisionListRequest,
    options?: PineScriptRunOptions,
  ): Promise<PineWorkspaceRevisionPage>;
```

Lists one page of saved revisions for a Pine document, up to 50 per page by default. Rejects when no workspace provider is configured or the provider does not support revision history.

| Parameter | Type | Required |
| --- | --- | --- |
| `request` | `PineWorkspaceRevisionListRequest` | Yes |
| `options` | `PineScriptRunOptions` | No |

## loadPineWorkspaceRevision {#loadpineworkspacerevision}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
loadPineWorkspaceRevision(
    id: string,
    revision: string,
    options?: PineScriptRunOptions,
  ): Promise<PineWorkspaceRevision>;
```

Loads the source of one saved revision of a Pine document. Rejects when no workspace provider is configured, the provider has no revision history, or it returns a different revision.

| Parameter | Type | Required |
| --- | --- | --- |
| `id` | `string` | Yes |
| `revision` | `string` | Yes |
| `options` | `PineScriptRunOptions` | No |

## linkPineStudyToWorkspace {#linkpinestudytoworkspace}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
linkPineStudyToWorkspace(
    studyId: EntityId,
    document: { id: string; revision: string },
  ): void;
```

Records on a Pine study which workspace document and revision its source came from, so the link is saved with the chart. Throws when the entity is not a Pine study.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |
| `document` | `{ id: string; revision: string }` | Yes |

**Failure conditions:** `Pine workspace is unavailable`.

## publishPineStudy {#publishpinestudy}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
publishPineStudy(
    studyId: EntityId,
    identity: PinePublicationIdentity & {
      visibility: "private" | "unlisted" | "public";
    },
    options?: PineScriptRunOptions,
  ): Promise<PinePublication>;
```

Compiles the Pine study's current source and publishes it through the configured `pine_script.publication_provider`, then records the publication on the study. Rejects when the declared script kind differs from `identity.kind`, no provider is configured, or the provider's result does not match the request.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |
| `identity` | `PinePublicationIdentity & {       visibility: "private" &#124; "unlisted" &#124; "public";     }` | Yes |
| `options` | `PineScriptRunOptions` | No |

## setPineAlertDeliveryChannel {#setpinealertdeliverychannel}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
setPineAlertDeliveryChannel(ruleId: string, channelId: string | null): void;
```

Routes future events of a Pine alert rule to a delivery channel, or stops delivery for that rule when `channelId` is null or blank. Delivery happens only when `pine_script.alert_delivery_provider` is configured.

| Parameter | Type | Required |
| --- | --- | --- |
| `ruleId` | `string` | Yes |
| `channelId` | `string &#124; null` | Yes |

**Failure conditions:** `Pine alert delivery is unavailable`.

## getPineAlertDeliveryStatuses {#getpinealertdeliverystatuses}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
getPineAlertDeliveryStatuses(): readonly PineAlertDeliveryStatus[];
```

Returns frozen snapshots of Pine alert deliveries attempted by this chart, each in the `pending`, `delivered`, `failed` or `cancelled` state. Returns an empty array when nothing has been delivered.

## getPineObjectOverrides {#getpineobjectoverrides}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
getPineObjectOverrides(
    studyId: EntityId,
  ): readonly PineObjectOverrideSnapshot[];
```

Returns the user edits currently stored on a Pine study's drawing objects. Throws when the entity is not a Pine study.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |

**Failure conditions:** `Pine object interaction is unavailable`.

## updatePineObjectOverride {#updatepineobjectoverride}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
updatePineObjectOverride(
    studyId: EntityId,
    objectId: string,
    patch: PineObjectOverridePatch,
  ): PineObjectOverrideSnapshot;
```

Validates and merges a patch into the stored override for one Pine drawing object, saves it on the study with undo support, and returns the resulting override. Throws when `pine_script.object_interaction` is disabled, the object no longer exists, the object is locked, or the override limit is exceeded.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |
| `objectId` | `string` | Yes |
| `patch` | `PineObjectOverridePatch` | Yes |

**Failure conditions:** `Pine object interaction is unavailable`.

## resetPineObjectOverride {#resetpineobjectoverride}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
resetPineObjectOverride(
    studyId: EntityId,
    objectId: string,
    paths?: readonly PineObjectOverridePath[],
  ): void;
```

Removes the given override paths from a Pine drawing object, or its whole override when `paths` is omitted; does nothing if the object has no override. Throws when object interaction is disabled or the object is locked and `paths` does not include `locked`.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |
| `objectId` | `string` | Yes |
| `paths` | `readonly PineObjectOverridePath[]` | No |

**Failure conditions:** `Pine object interaction is unavailable`.

## subscribePineStrategyReport {#subscribepinestrategyreport}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
subscribePineStrategyReport(
    studyId: EntityId,
    listener: (change: PineStrategyReportChange) => void,
  ): () => void;
```

Calls the listener with a frozen strategy report each time the Pine strategy produces a new one, and returns an unsubscribe function. Throws when the study is not a Pine strategy; returns a no-op unsubscribe when the chart has no Pine support.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |
| `listener` | `(change: PineStrategyReportChange) => void` | Yes |

**Failure conditions:** `Pine strategy listener must be a function`.

## subscribePineStudyObjects {#subscribepinestudyobjects}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
subscribePineStudyObjects(
    studyId: EntityId,
    listener: (change: PineStudyObjectChange) => void,
  ): () => void;
```

Calls the listener with frozen snapshots whenever a Pine study's drawing objects change, and returns an unsubscribe function. Throws when the entity is not a Pine study or the listener is not a function.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |
| `listener` | `(change: PineStudyObjectChange) => void` | Yes |

**Failure conditions:** `Pine object listener must be a function`.

## subscribePineAlertDeliveryStatuses {#subscribepinealertdeliverystatuses}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
subscribePineAlertDeliveryStatuses(
    listener: (status: PineAlertDeliveryStatus) => void,
  ): () => void;
```

Calls the listener with a frozen status each time a Pine alert delivery changes state, and returns an unsubscribe function. Throws when the listener is not a function.

| Parameter | Type | Required |
| --- | --- | --- |
| `listener` | `(status: PineAlertDeliveryStatus) => void` | Yes |

**Failure conditions:** `Pine alert delivery listener must be a function`.

## subscribePineObjectOverrides {#subscribepineobjectoverrides}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
subscribePineObjectOverrides(
    studyId: EntityId,
    listener: (change: PineObjectOverrideChange) => void,
  ): () => void;
```

Calls the listener whenever the stored overrides on a Pine study's drawing objects change, and returns an unsubscribe function. Throws when the entity is not a Pine study or the listener is not a function.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |
| `listener` | `(change: PineObjectOverrideChange) => void` | Yes |

**Failure conditions:** `Pine object override listener must be a function`.

## subscribePineStudyMigrations {#subscribepinestudymigrations}

**Capability-dependent.** Requires the matching optional feature/provider and valid chart binding.

```ts
subscribePineStudyMigrations(
    listener: (studyId: EntityId, report: PineStudyMigrationReport) => void,
  ): () => void;
```

Calls the listener with a report when a Pine study's source changes and its inputs, style overrides and alert rules are carried over to the new script, listing what was kept, reset or removed. Returns an unsubscribe function.

| Parameter | Type | Required |
| --- | --- | --- |
| `listener` | `(studyId: EntityId, report: PineStudyMigrationReport) => void` | Yes |

**Failure conditions:** `Pine migration listener must be a function`.

## getStudyById {#getstudybyid}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
getStudyById(entityId: EntityId): IStudyApi;
```

Returns an API object for reading and changing an existing study, including its inputs, styles, visibility, z-order and pane placement. Throws when no study has that id.

| Parameter | Type | Required |
| --- | --- | --- |
| `entityId` | `EntityId` | Yes |

**Failure conditions:** `There is no such study`.

## getSeries {#getseries}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
getSeries(): ISeriesApi;
```

Use the type signature above and the integration guide for the owning capability.

## createShape {#createshape}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createShape<TOverrides extends object>(
    point: ShapePoint,
    options: CreateShapeOptions<TOverrides>,
  ): EntityId | null;
```

Creates a single-point drawing of the type named in `options.shape` and returns its id, or null when the chart did not create it. Throws when the point or options fail validation.

| Parameter | Type | Required |
| --- | --- | --- |
| `point` | `ShapePoint` | Yes |
| `options` | `CreateShapeOptions<TOverrides>` | Yes |

## createMultipointShape {#createmultipointshape}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createMultipointShape<TOverrides extends object>(
    points: ShapePoint[],
    options: CreateMultipointShapeOptions<TOverrides>,
  ): EntityId | null;
```

Creates a drawing from several points, using the tool named in `options.shape`, and returns its id, or null when the chart did not create it. Throws when the points do not fit the tool or fail validation.

| Parameter | Type | Required |
| --- | --- | --- |
| `points` | `ShapePoint[]` | Yes |
| `options` | `CreateMultipointShapeOptions<TOverrides>` | Yes |

## createAnchoredShape {#createanchoredshape}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createAnchoredShape<TOverrides extends object>(
    position: PositionPercents,
    options: CreateAnchoredShapeOptions<TOverrides>,
  ): EntityId | null;
```

Creates a drawing positioned by a percentage of the pane rather than by time and price, and returns its id or null. Behaves like `createShape` with the anchored flag set.

| Parameter | Type | Required |
| --- | --- | --- |
| `position` | `PositionPercents` | Yes |
| `options` | `CreateAnchoredShapeOptions<TOverrides>` | Yes |

## getShapeById {#getshapebyid}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
getShapeById(entityId: EntityId): ILineDataSourceApi;
```

Returns an API object for reading and editing the drawing with the given id, such as its points and properties.

| Parameter | Type | Required |
| --- | --- | --- |
| `entityId` | `EntityId` | Yes |

## removeEntity {#removeentity}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
removeEntity(entityId: EntityId, options?: UndoOptions): void;
```

Removes the drawing or study with the given id. Logs a warning when no drawing or study has that id.

| Parameter | Type | Required |
| --- | --- | --- |
| `entityId` | `EntityId` | Yes |
| `options` | `UndoOptions` | No |

## removeAllShapes {#removeallshapes}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
removeAllShapes(): void;
```

Removes every drawing from the chart and clears its drawing groups.

## removeAllStudies {#removeallstudies}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
removeAllStudies(): void;
```

Removes every study from the chart, along with drawings attached to those studies, as one undoable step.

## selection {#selection}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
selection(): ISelectionApi;
```

Returns an API object for reading and changing which drawings and studies are selected, and for subscribing to selection changes.

## showPropertiesDialog {#showpropertiesdialog}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
showPropertiesDialog(studyId: EntityId): void;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `studyId` | `EntityId` | Yes |

## createStudyTemplate {#createstudytemplate}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createStudyTemplate(options: CreateStudyTemplateOptions): object;
```

Returns a plain-object template of the chart's studies and pane layout, optionally including the symbol (`saveSymbol`) and interval (`saveInterval`). Throws when study templates are unavailable.

| Parameter | Type | Required |
| --- | --- | --- |
| `options` | `CreateStudyTemplateOptions` | Yes |

## applyStudyTemplate {#applystudytemplate}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
applyStudyTemplate(template: object): void;
```

Replaces the chart's studies and pane layout with those in a template, switching symbol or interval only when the template includes them; the change is recorded as one undo step. Throws a `TypeError` when the template is not a plain object.

| Parameter | Type | Required |
| --- | --- | --- |
| `template` | `object` | Yes |

## createOrderLine {#createorderline}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createOrderLine(options?: UndoOptions): IOrderLineAdapter;
```

Adds an order line at the latest price and returns an adapter for configuring it, with order-line defaults from the trading customization applied. Pass `disableUndo: true` to keep the creation out of undo history.

| Parameter | Type | Required |
| --- | --- | --- |
| `options` | `UndoOptions` | No |

**Failure conditions:** `Order lines are not supported by this chart`.

## createPositionLine {#createpositionline}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createPositionLine(options?: UndoOptions): IPositionLineAdapter;
```

Adds a position line at the latest price and returns an adapter for configuring it, with position-line defaults from the trading customization applied. Pass `disableUndo: true` to keep the creation out of undo history.

| Parameter | Type | Required |
| --- | --- | --- |
| `options` | `UndoOptions` | No |

**Failure conditions:** `Position lines are not supported by this chart`.

## createExecutionShape {#createexecutionshape}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
createExecutionShape(options?: UndoOptions): IExecutionLineAdapter;
```

Adds an execution marker at the latest price and time and returns an adapter for configuring it. Pass `disableUndo: true` to keep the creation out of undo history.

| Parameter | Type | Required |
| --- | --- | --- |
| `options` | `UndoOptions` | No |

**Failure conditions:** `Execution shapes are not supported by this chart`.

## symbol {#symbol}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
symbol(): string;
```

Returns the chart's current symbol, or an empty string when none is set.

## symbolExt {#symbolext}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
symbolExt(): SymbolExt | null;
```

Returns the resolved symbol information for the main series, or null while the symbol has not resolved.

## resolution {#resolution}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
resolution(): ResolutionString;
```

Returns the chart's current resolution.

## getVisibleRange {#getvisiblerange}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
getVisibleRange(): VisibleTimeRange;
```

Returns the time range currently visible on the chart; returns `{ from: 0, to: 0 }` before the chart surface is ready.

## priceFormatter {#priceformatter}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
priceFormatter(): INumberFormatter;
```

Use the type signature above and the integration guide for the owning capability.

## chartType {#charttype}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
chartType(): SeriesType;
```

Returns the current chart style of the main series.

## getTimezoneApi {#gettimezoneapi}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
getTimezoneApi(): ITimezoneApi;
```

Use the type signature above and the integration guide for the owning capability.

## getPanes {#getpanes}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
getPanes(): IPaneApi[];
```

Returns an API object for each pane, top to bottom, giving access to its height, price scales and the studies it contains. The first pane holds the main series.

## exportData {#exportdata}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
exportData(options?: Partial<ExportDataOptions>): Promise<ExportedData>;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `options` | `Partial<ExportDataOptions>` | No |

## canZoomOut {#canzoomout}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
canZoomOut(): boolean;
```

Returns true when the bar spacing is greater than 3 pixels, so `zoomOut` can still shrink the bars.

## zoomOut {#zoomout}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
zoomOut(): void;
```

Zooms out by dividing the current bar spacing by 1.2.

## setZoomEnabled {#setzoomenabled}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
setZoomEnabled(enabled: boolean): void;
```

Enables or disables zooming the chart through user interaction.

| Parameter | Type | Required |
| --- | --- | --- |
| `enabled` | `boolean` | Yes |

## setScrollEnabled {#setscrollenabled}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
setScrollEnabled(enabled: boolean): void;
```

Enables or disables scrolling the chart through user interaction.

| Parameter | Type | Required |
| --- | --- | --- |
| `enabled` | `boolean` | Yes |

## shapesGroupController {#shapesgroupcontroller}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
shapesGroupController(): IShapesGroupControllerApi;
```

Returns an API object for creating, naming, hiding, locking and reordering groups of drawings.

## barTimeToEndOfPeriod {#bartimetoendofperiod}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
barTimeToEndOfPeriod(unixTime: number): number;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `unixTime` | `number` | Yes |

## endOfPeriodToBarTime {#endofperiodtobartime}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
endOfPeriodToBarTime(unixTime: number): number;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `unixTime` | `number` | Yes |

## getTimeScale {#gettimescale}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
getTimeScale(): ITimeScaleApi;
```

Returns an API object for the chart's time scale, with bar spacing, right offset, width and coordinate-to-time conversion.

## isSelectBarRequested {#isselectbarrequested}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
isSelectBarRequested(): boolean;
```

Returns true while a `requestSelectBar` request is waiting for the user to pick a bar.

## requestSelectBar {#requestselectbar}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
requestSelectBar(options?: SelectBarRequestOptions): Promise<number>;
```

Puts the chart into bar-selection mode and resolves with the time of the bar the user clicks. Rejects when a request is already pending, the main series has no data yet, or the selection is cancelled.

| Parameter | Type | Required |
| --- | --- | --- |
| `options` | `SelectBarRequestOptions` | No |

## cancelSelectBar {#cancelselectbar}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
cancelSelectBar(): void;
```

Cancels a pending `requestSelectBar` request, which rejects its promise. Does nothing when no request is pending.

## resetView {#resetview}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
resetView(): void;
```

Restores the default time viewport and automatic price scale.

## loadChartTemplate {#loadcharttemplate}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
loadChartTemplate(templateName: string): Promise<void>;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `templateName` | `string` | Yes |

## marketStatus {#marketstatus}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
marketStatus(): IWatchedValueReadonly<MarketStatus | null>;
```

Use the type signature above and the integration guide for the owning capability.

## setTimeFrame {#settimeframe}

**Compatibility declaration only.** This member is not exposed by the current source facade. Do not rely on it in this release.

```ts
setTimeFrame(timeFrame: RangeOptions): void;
```

Use the type signature above and the integration guide for the owning capability.

| Parameter | Type | Required |
| --- | --- | --- |
| `timeFrame` | `RangeOptions` | Yes |

## getLineToolsState {#getlinetoolsstate}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
getLineToolsState(): LineToolsAndGroupsState;
```

Returns a serializable snapshot of the chart's drawings and drawing groups for saving to separate drawing storage. Throws when the `saveload_separate_drawings_storage` feature is disabled.

## applyLineToolsState {#applylinetoolsstate}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
applyLineToolsState(state: LineToolsAndGroupsState): Promise<void>;
```

Replaces the chart's drawings and drawing groups with those in a saved snapshot in one step. Rejects when the `saveload_separate_drawings_storage` feature is disabled.

| Parameter | Type | Required |
| --- | --- | --- |
| `state` | `LineToolsAndGroupsState` | Yes |

## reloadLineToolsFromServer {#reloadlinetoolsfromserver}

**Runtime-backed.** Use after chart readiness unless this is a readiness or disposal method.

```ts
reloadLineToolsFromServer(): void;
```

Re-reads the chart's drawings from separate drawing storage when one is attached; otherwise re-applies the current drawings without recording an undo step.

## Related types

- [OpenChartAutomationOptions](https://docs.lumencharts.com/charting-library/api/OpenChartAutomationOptions)
- [ISubscription](https://docs.lumencharts.com/charting-library/api/ISubscription)
- [ChartDataStatus](https://docs.lumencharts.com/charting-library/api/ChartDataStatus)
- [ChartDatafeedConnectionStatus](https://docs.lumencharts.com/charting-library/api/ChartDatafeedConnectionStatus)
- [ResolutionString](https://docs.lumencharts.com/charting-library/api/ResolutionString)
- [TimeFrameValue](https://docs.lumencharts.com/charting-library/api/TimeFrameValue)
- [VisibleTimeRange](https://docs.lumencharts.com/charting-library/api/VisibleTimeRange)
- [SeriesType](https://docs.lumencharts.com/charting-library/api/SeriesType)
- [CrossHairMovedEventParams](https://docs.lumencharts.com/charting-library/api/CrossHairMovedEventParams)
- [EntityId](https://docs.lumencharts.com/charting-library/api/EntityId)
- [SetVisibleTimeRange](https://docs.lumencharts.com/charting-library/api/SetVisibleTimeRange)
- [SetVisibleRangeOptions](https://docs.lumencharts.com/charting-library/api/SetVisibleRangeOptions)
- [SetSymbolOptions](https://docs.lumencharts.com/charting-library/api/SetSymbolOptions)
- [SetResolutionOptions](https://docs.lumencharts.com/charting-library/api/SetResolutionOptions)
- [ChartActionId](https://docs.lumencharts.com/charting-library/api/ChartActionId)
- [ClearMarksMode](https://docs.lumencharts.com/charting-library/api/ClearMarksMode)
- [EntityInfo](https://docs.lumencharts.com/charting-library/api/EntityInfo)
- [UndoOptions](https://docs.lumencharts.com/charting-library/api/UndoOptions)
- [AvailableZOrderOperations](https://docs.lumencharts.com/charting-library/api/AvailableZOrderOperations)
- [SingleIndicatorOverrides](https://docs.lumencharts.com/charting-library/api/indicator-overrides#singleindicatoroverrides)
- [StudyInputValue](https://docs.lumencharts.com/charting-library/api/StudyInputValue)
- [CreateStudyOptions](https://docs.lumencharts.com/charting-library/api/CreateStudyOptions)
- [PineScriptRunOptions](https://docs.lumencharts.com/charting-library/api/PineScriptRunOptions)
- [PineScriptCompileResult](https://docs.lumencharts.com/charting-library/api/PineScriptCompileResult)
- [PineScriptStudyOptions](https://docs.lumencharts.com/charting-library/api/PineScriptStudyOptions)
- [PineScriptStudyState](https://docs.lumencharts.com/charting-library/api/PineScriptStudyState)
- [PineAlertRuleInput](https://docs.lumencharts.com/charting-library/api/PineAlertRuleInput)
- [PineAlertRule](https://docs.lumencharts.com/charting-library/api/PineAlertRule)
- [PineAlertEvent](https://docs.lumencharts.com/charting-library/api/PineAlertEvent)
- [PineStrategyReport](https://docs.lumencharts.com/charting-library/api/PineStrategyReport)
- [PineStudyObjectSnapshot](https://docs.lumencharts.com/charting-library/api/PineStudyObjectSnapshot)
- [PineWorkspaceListRequest](https://docs.lumencharts.com/charting-library/api/PineWorkspaceListRequest)
- [PineWorkspacePage](https://docs.lumencharts.com/charting-library/api/PineWorkspacePage)
- [PineWorkspaceDocument](https://docs.lumencharts.com/charting-library/api/PineWorkspaceDocument)
- [PineWorkspaceCreateRequest](https://docs.lumencharts.com/charting-library/api/PineWorkspaceCreateRequest)
- [PineWorkspaceUpdateRequest](https://docs.lumencharts.com/charting-library/api/PineWorkspaceUpdateRequest)
- [PineWorkspaceRevisionListRequest](https://docs.lumencharts.com/charting-library/api/PineWorkspaceRevisionListRequest)
- [PineWorkspaceRevisionPage](https://docs.lumencharts.com/charting-library/api/PineWorkspaceRevisionPage)
- [PineWorkspaceRevision](https://docs.lumencharts.com/charting-library/api/PineWorkspaceRevision)
- [PinePublicationIdentity](https://docs.lumencharts.com/charting-library/api/PinePublicationIdentity)
- [PinePublication](https://docs.lumencharts.com/charting-library/api/PinePublication)
- [PineAlertDeliveryStatus](https://docs.lumencharts.com/charting-library/api/PineAlertDeliveryStatus)
- [PineObjectOverrideSnapshot](https://docs.lumencharts.com/charting-library/api/PineObjectOverrideSnapshot)
- [PineObjectOverridePatch](https://docs.lumencharts.com/charting-library/api/PineObjectOverridePatch)
- [PineObjectOverridePath](https://docs.lumencharts.com/charting-library/api/PineObjectOverridePath)
- [PineStrategyReportChange](https://docs.lumencharts.com/charting-library/api/PineStrategyReportChange)
- [PineStudyObjectChange](https://docs.lumencharts.com/charting-library/api/PineStudyObjectChange)
- [PineObjectOverrideChange](https://docs.lumencharts.com/charting-library/api/PineObjectOverrideChange)
- [PineStudyMigrationReport](https://docs.lumencharts.com/charting-library/api/PineStudyMigrationReport)
- [IStudyApi](https://docs.lumencharts.com/charting-library/api/IStudyApi)
- [ISeriesApi](https://docs.lumencharts.com/charting-library/api/ISeriesApi)
- [ShapePoint](https://docs.lumencharts.com/charting-library/api/ShapePoint)
- [CreateShapeOptions](https://docs.lumencharts.com/charting-library/api/CreateShapeOptions)
- [CreateMultipointShapeOptions](https://docs.lumencharts.com/charting-library/api/CreateMultipointShapeOptions)
- [PositionPercents](https://docs.lumencharts.com/charting-library/api/PositionPercents)
- [CreateAnchoredShapeOptions](https://docs.lumencharts.com/charting-library/api/CreateAnchoredShapeOptions)
- [ILineDataSourceApi](https://docs.lumencharts.com/charting-library/api/ILineDataSourceApi)
- [ISelectionApi](https://docs.lumencharts.com/charting-library/api/ISelectionApi)
- [CreateStudyTemplateOptions](https://docs.lumencharts.com/charting-library/api/CreateStudyTemplateOptions)
- [IOrderLineAdapter](https://docs.lumencharts.com/charting-library/api/IOrderLineAdapter)
- [IPositionLineAdapter](https://docs.lumencharts.com/charting-library/api/IPositionLineAdapter)
- [IExecutionLineAdapter](https://docs.lumencharts.com/charting-library/api/IExecutionLineAdapter)
- [SymbolExt](https://docs.lumencharts.com/charting-library/api/SymbolExt)
- [INumberFormatter](https://docs.lumencharts.com/charting-library/api/INumberFormatter)
- [ITimezoneApi](https://docs.lumencharts.com/charting-library/api/ITimezoneApi)
- [IPaneApi](https://docs.lumencharts.com/charting-library/api/IPaneApi)
- [ExportDataOptions](https://docs.lumencharts.com/charting-library/api/ExportDataOptions)
- [ExportedData](https://docs.lumencharts.com/charting-library/api/ExportedData)
- [IShapesGroupControllerApi](https://docs.lumencharts.com/charting-library/api/IShapesGroupControllerApi)
- [ITimeScaleApi](https://docs.lumencharts.com/charting-library/api/ITimeScaleApi)
- [SelectBarRequestOptions](https://docs.lumencharts.com/charting-library/api/SelectBarRequestOptions)
- [IWatchedValueReadonly](https://docs.lumencharts.com/charting-library/api/IWatchedValueReadonly)
- [MarketStatus](https://docs.lumencharts.com/charting-library/api/MarketStatus)
- [RangeOptions](https://docs.lumencharts.com/charting-library/api/RangeOptions)
- [LineToolsAndGroupsState](https://docs.lumencharts.com/charting-library/api/LineToolsAndGroupsState)

---
Documentation page: https://docs.lumencharts.com/charting-library/api/IChartWidgetApi
