Skip to main content

Interface: SubscribeEventsMap

Charting Library.SubscribeEventsMap

Properties

activeChartChanged

activeChartChanged: (chartIndex: number) => void

Active chart has changed. Note: this event is only applicable to Trading Platform.

Type declaration

▸ (chartIndex): void

Parameters
NameTypeDescription
chartIndexnumberindex of the active chart
Returns

void


add_compare

add_compare: EmptyCallback

A compare instrument has been added


chart_load_requested

chart_load_requested: (savedData: object) => void

New chart is about to be loaded

Type declaration

▸ (savedData): void

Parameters
NameTypeDescription
savedDataobjectchart data about to be loaded
Returns

void


chart_loaded

chart_loaded: EmptyCallback

Chart has finished loading


compare_add

compare_add: EmptyCallback

A compare dialog has been shown


dragEnd

dragEnd: EmptyCallback

Drag end


dragStart

dragStart: (params: DragStartParams) => void

Drag start

Type declaration

▸ (params): void

Parameters
NameType
paramsDragStartParams
Returns

void


drawing

drawing: (params: StudyOrDrawingAddedToChartEventParams) => void

A drawing has been added to a chart.

Type declaration

▸ (params): void

Parameters
NameTypeDescription
paramsStudyOrDrawingAddedToChartEventParamsThe arguments contain an object with the value field that corresponds with the name of the drawing.
Returns

void


drawing_event

drawing_event: (sourceId: EntityId, drawingEventType: DrawingEventType) => void

Drawing was hidden, shown, moved, removed, clicked, or created

Type declaration

▸ (sourceId, drawingEventType): void

Parameters
NameTypeDescription
sourceIdEntityIddrawing ID
drawingEventTypeDrawingEventTypedrawing event type
Returns

void


edit_object_dialog

edit_object_dialog: (params: EditObjectDialogEventParams) => void

Chart / Study Properties dialog is shown

Type declaration

▸ (params): void

Parameters
NameTypeDescription
paramsEditObjectDialogEventParamsmeta information about the dialog type and the title of the chart or study
Returns

void


indicators_dialog

indicators_dialog: EmptyCallback

Indicators dialog is shown


layout_about_to_be_changed

layout_about_to_be_changed: (newLayoutType: LayoutType) => void

Amount or placement of the charts is about to be changed. Note: this event is only applicable to Trading Platform.

Type declaration

▸ (newLayoutType): void

Parameters
NameTypeDescription
newLayoutTypeLayoutTypewhether the layout is single or multi-chart
Returns

void


layout_changed

layout_changed: EmptyCallback

Amount or placement of the charts is changed. Note: this event is only applicable to Trading Platform.


load_study_template

load_study_template: EmptyCallback

A study template has been loaded


mouse_down

mouse_down: (params: MouseEventParams) => void

Mouse button has been pressed

Type declaration

▸ (params): void

Parameters
NameType
paramsMouseEventParams
Returns

void


mouse_up

mouse_up: (params: MouseEventParams) => void

Mouse button has been released

Type declaration

▸ (params): void

Parameters
NameType
paramsMouseEventParams
Returns

void


onAutoSaveNeeded

onAutoSaveNeeded: EmptyCallback

User has changed the chart. Chart change means any user action that can be undone. The callback function will not be called more than once every 5 seconds. See also auto_save_delay within the Widget constructor options (ChartingLibraryWidgetOptions.auto_save_delay).


onMarkClick

onMarkClick: (markId: string | number) => void

User has clicked on a 'mark on a bar'.

Type declaration

▸ (markId): void

Parameters
NameTypeDescription
markIdstring | numberID of the clicked mark
Returns

void


onPlusClick

onPlusClick: (params: PlusClickParams) => void

User clicked the Plus button on the price scale.

Type declaration

▸ (params): void

Parameters
NameTypeDescription
paramsPlusClickParamscoordinates, price, and symbol information
Returns

void


onScreenshotReady

onScreenshotReady: (url: string) => void

A screenshot URL has been returned by the server

Type declaration

▸ (url): void

Parameters
NameTypeDescription
urlstringurl of the screenshot
Returns

void


onSelectedLineToolChanged

onSelectedLineToolChanged: EmptyCallback

Selected drawing tool has changed


onTick

onTick: (tick: Bar) => void

Last bar has been updated

Type declaration

▸ (tick): void

Parameters
NameTypeDescription
tickBardata for last bar
Returns

void


onTimescaleMarkClick

onTimescaleMarkClick: (markId: string | number) => void

User clicked a 'timescale mark'.

Type declaration

▸ (markId): void

Parameters
NameTypeDescription
markIdstring | numberID of the clicked timescale mark
Returns

void


panes_height_changed

panes_height_changed: EmptyCallback

Panes' size has changed.


panes_order_changed

panes_order_changed: EmptyCallback

Panes' order has changed.


redo

redo: EmptyCallback

Redo action occurred


reset_scales

reset_scales: EmptyCallback

Reset scales button has been clicked


series_event

series_event: (seriesEventType: "price_scale_changed") => void

An event related to the series has occurred.

Type declaration

▸ (seriesEventType): void

Parameters
NameTypeDescription
seriesEventType"price_scale_changed"series event type
Returns

void


series_properties_changed

series_properties_changed: (id: EntityId) => void

Main series properties have changed.

Type declaration

▸ (id): void

Parameters
NameTypeDescription
idEntityIdentity ID
Returns

void


study

study: (params: StudyOrDrawingAddedToChartEventParams) => void

An indicator has been added to a chart.

Type declaration

▸ (params): void

Parameters
NameTypeDescription
paramsStudyOrDrawingAddedToChartEventParamsThe arguments contain an object with the value field that corresponds with the name of the indicator.
Returns

void


study_dialog_save_defaults

study_dialog_save_defaults: (id: EntityId) => void

The Save as default option is selected in the drop-down menu of the indicator settings.

Type declaration

▸ (id): void

Parameters
NameTypeDescription
idEntityIdentity ID
Returns

void


study_event

study_event: (entityId: EntityId, studyEventType: StudyEventType) => void

An event related to the study has occurred.

Type declaration

▸ (entityId, studyEventType): void

Parameters
NameTypeDescription
entityIdEntityIdstudy ID
studyEventTypeStudyEventTypestudy event type
Returns

void


study_properties_changed

study_properties_changed: (id: EntityId) => void

Study properties have changed.

Type declaration

▸ (id): void

Parameters
NameTypeDescription
idEntityIdentity ID
Returns

void


timeframe_interval

timeframe_interval: (range: RangeOptions) => void

Time interval has been changed. Can come from either the bottom toolbar or the setTimeFrame API.

Type declaration

▸ (range): void

Parameters
NameTypeDescription
rangeRangeOptionsObject that represents a selected time frame.
Returns

void


toggle_header

toggle_header: (isHidden: boolean) => void

Chart header is shown/hidden

Type declaration

▸ (isHidden): void

Parameters
NameTypeDescription
isHiddenbooleanis the chart header currently hidden
Returns

void


toggle_sidebar

toggle_sidebar: (isHidden: boolean) => void

Drawing toolbar is shown/hidden

Type declaration

▸ (isHidden): void

Parameters
NameTypeDescription
isHiddenbooleanis the drawing toolbar currently hidden
Returns

void


undo

undo: EmptyCallback

Undo action occurred


undo_redo_state_changed

undo_redo_state_changed: (state: UndoRedoState) => void

The Undo / Redo state has been changed.

Type declaration

▸ (state): void

Parameters
NameTypeDescription
stateUndoRedoStatestate of the Undo/Redo stack
Returns

void


widgetbar_visibility_changed

widgetbar_visibility_changed: (isVisible: boolean) => void

Chart's widget bar is shown/hidden.

Type declaration

▸ (isVisible): void

Parameters
NameTypeDescription
isVisiblebooleanif the widget bar is currently hidden
Returns

void