Skip to main content
Version: Next

Interface: IPaneApi<HorzScaleItem>

Represents the interface for interacting with a pane in a lightweight chart.

Type parameters

HorzScaleItem

Methods

getHeight()

getHeight(): number

Retrieves the height of the pane in pixels.

Returns

number

The height of the pane in pixels.


setHeight()

setHeight(height): void

Sets the height of the pane.

Parameters

height: number

The number of pixels to set as the height of the pane.

Returns

void


moveTo()

moveTo(paneIndex): void

Moves the pane to a new position.

Parameters

paneIndex: number

The target index of the pane. Should be a number between 0 and the total number of panes - 1.

Returns

void


paneIndex()

paneIndex(): number

Retrieves the index of the pane.

Returns

number

The index of the pane. It is a number between 0 and the total number of panes - 1.


getSeries()

getSeries(): ISeriesApi<keyof SeriesOptionsMap, HorzScaleItem, AreaData<HorzScaleItem> | WhitespaceData<HorzScaleItem> | BarData<HorzScaleItem> | CandlestickData<HorzScaleItem> | BaselineData<HorzScaleItem> | LineData<HorzScaleItem> | HistogramData<HorzScaleItem> | CustomData<HorzScaleItem> | CustomSeriesWhitespaceData<HorzScaleItem>, CustomSeriesOptions | AreaSeriesOptions | BarSeriesOptions | CandlestickSeriesOptions | BaselineSeriesOptions | LineSeriesOptions | HistogramSeriesOptions, DeepPartial <AreaStyleOptions & SeriesOptionsCommon> | DeepPartial <BarStyleOptions & SeriesOptionsCommon> | DeepPartial <CandlestickStyleOptions & SeriesOptionsCommon> | DeepPartial <BaselineStyleOptions & SeriesOptionsCommon> | DeepPartial <LineStyleOptions & SeriesOptionsCommon> | DeepPartial <HistogramStyleOptions & SeriesOptionsCommon> | DeepPartial <CustomStyleOptions & SeriesOptionsCommon>>[]

Retrieves the array of series for the current pane.

Returns

ISeriesApi<keyof SeriesOptionsMap, HorzScaleItem, AreaData<HorzScaleItem> | WhitespaceData<HorzScaleItem> | BarData<HorzScaleItem> | CandlestickData<HorzScaleItem> | BaselineData<HorzScaleItem> | LineData<HorzScaleItem> | HistogramData<HorzScaleItem> | CustomData<HorzScaleItem> | CustomSeriesWhitespaceData<HorzScaleItem>, CustomSeriesOptions | AreaSeriesOptions | BarSeriesOptions | CandlestickSeriesOptions | BaselineSeriesOptions | LineSeriesOptions | HistogramSeriesOptions, DeepPartial <AreaStyleOptions & SeriesOptionsCommon> | DeepPartial <BarStyleOptions & SeriesOptionsCommon> | DeepPartial <CandlestickStyleOptions & SeriesOptionsCommon> | DeepPartial <BaselineStyleOptions & SeriesOptionsCommon> | DeepPartial <LineStyleOptions & SeriesOptionsCommon> | DeepPartial <HistogramStyleOptions & SeriesOptionsCommon> | DeepPartial <CustomStyleOptions & SeriesOptionsCommon>>[]

An array of series.


getHTMLElement()

getHTMLElement(): HTMLElement

Retrieves the HTML element of the pane.

Returns

HTMLElement

The HTML element of the pane.


attachPrimitive()

attachPrimitive(primitive): void

Attaches additional drawing primitive to the pane

Parameters

primitive: IPanePrimitive<HorzScaleItem>

any implementation of IPanePrimitive interface

Returns

void


detachPrimitive()

detachPrimitive(primitive): void

Detaches additional drawing primitive from the pane

Parameters

primitive: IPanePrimitive<HorzScaleItem>

implementation of IPanePrimitive interface attached before Does nothing if specified primitive was not attached

Returns

void