SubscribeEventsMap
Properties
activeChartChanged
Active chart has changed Note: this event is only applicable to Trading Platform.
Type
(chartIndex: number) => void
Type declaration
Signature
(chartIndex: number) => void
Parameters
Name | Type | Description |
---|---|---|
chartIndex | number | index of the active chart |
Returns
void
add_compare
A compare instrument has been added
Type
chart_load_requested
New chart is about to be loaded
Type
(savedData: object) => void
Type declaration
Signature
(savedData: object) => void
Parameters
Name | Type | Description |
---|---|---|
savedData | object | chart data about to be loaded |
Returns
void
chart_loaded
Chart has finished loading
Type
compare_add
A compare dialog has been shown
Type
drawing
A drawing has been added to a chart.
Type
(params: StudyOrDrawingAddedToChartEventParams) => void
Type declaration
Signature
(params: StudyOrDrawingAddedToChartEventParams) => void
Parameters
Name | Type | Description |
---|---|---|
params | StudyOrDrawingAddedToChartEventParams | The arguments contain an object with the value field that corresponds with the name of the drawing. |
Returns
void
drawing_event
Drawing was hidden, shown, moved, removed, clicked, or created
Type
(sourceId: EntityId, drawingEventType: DrawingEventType) => void
Type declaration
Signature
(sourceId: EntityId, drawingEventType: DrawingEventType) => void
Parameters
Name | Type | Description |
---|---|---|
sourceId | EntityId | drawing ID |
drawingEventType | DrawingEventType | drawing event type |
Returns
void
edit_object_dialog
Chart / Study Properties dialog is shown
Type
(params: EditObjectDialogEventParams) => void
Type declaration
Signature
(params: EditObjectDialogEventParams) => void
Parameters
Name | Type | Description |
---|---|---|
params | EditObjectDialogEventParams | meta information about the dialog type and the title of the chart or study |
Returns
void
indicators_dialog
Indicators dialog is shown
Type
layout_about_to_be_changed
Amount or placement of the charts is about to be changed. Note: this event is only applicable to Trading Platform.
Type
(newLayoutType: LayoutType) => void
Type declaration
Signature
(newLayoutType: LayoutType) => void
Parameters
Name | Type | Description |
---|---|---|
newLayoutType | LayoutType | whether the layout is single or multi-chart |
Returns
void
layout_changed
Amount or placement of the charts is changed. Note: this event is only applicable to Trading Platform.
Type
load_study_template
A study template has been loaded
Type
mouse_down
Mouse button has been pressed
Type
(params: MouseEventParams) => void
Type declaration
Signature
(params: MouseEventParams) => void
Parameters
Name | Type |
---|---|
params | MouseEventParams |
Returns
void
mouse_up
Mouse button has been released
Type
(params: MouseEventParams) => void
Type declaration
Signature
(params: MouseEventParams) => void
Parameters
Name | Type |
---|---|
params | MouseEventParams |
Returns
void
onAutoSaveNeeded
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).
Type
onMarkClick
User has clicked on a 'mark on a bar'.
Type
(markId: string | number) => void
Type declaration
Signature
(markId: string | number) => void
Parameters
Name | Type | Description |
---|---|---|
markId | string | number | ID of the clicked mark |
Returns
void
onPlusClick
User clicked the "plus" button on the price scale.
Type
(params: PlusClickParams) => void
Type declaration
Signature
(params: PlusClickParams) => void
Parameters
Name | Type | Description |
---|---|---|
params | PlusClickParams | coordinates, price and symbol information |
Returns
void
onScreenshotReady
A screenshot URL has been returned by the server
Type
(url: string) => void
Type declaration
Signature
(url: string) => void
Parameters
Name | Type | Description |
---|---|---|
url | string | url of the screenshot |
Returns
void
onSelectedLineToolChanged
Selected drawing tool has changed
Type
onTick
Last bar has been updated
Type
(tick: Bar) => void
Type declaration
Signature
(tick: Bar) => void
Parameters
Name | Type | Description |
---|---|---|
tick | Bar | data for last bar |
Returns
void
onTimescaleMarkClick
User clicked a 'timescale mark'.
Type
(markId: string | number) => void
Type declaration
Signature
(markId: string | number) => void
Parameters
Name | Type | Description |
---|---|---|
markId | string | number | ID of the clicked timescale mark |
Returns
void
panes_height_changed
Panes' size has changed.
Type
() => void
Type declaration
Signature
() => void
Returns
void
panes_order_changed
Panes' order has changed.
Type
() => void
Type declaration
Signature
() => void
Returns
void
redo
Redo action occurred
Type
reset_scales
Reset scales button has been clicked
Type
series_event
An event related to the series has occurred.
Type
(seriesEventType: "price_scale_changed") => void
Type declaration
Signature
(seriesEventType: "price_scale_changed") => void
Parameters
Name | Type | Description |
---|---|---|
seriesEventType | "price_scale_changed" | series event type |
Returns
void
series_properties_changed
Main series properties have changed.
Type
(id: EntityId) => void
Type declaration
Signature
(id: EntityId) => void
Parameters
Name | Type | Description |
---|---|---|
id | EntityId | entity ID |
Returns
void
study
An indicator has been added to a chart.
Type
(params: StudyOrDrawingAddedToChartEventParams) => void
Type declaration
Signature
(params: StudyOrDrawingAddedToChartEventParams) => void
Parameters
Name | Type | Description |
---|---|---|
params | StudyOrDrawingAddedToChartEventParams | The arguments contain an object with the value field that corresponds with the name of the indicator. |
Returns
void
study_event
An event related to the study has occurred.
Type
(entityId: EntityId, studyEventType: StudyEventType) => void
Type declaration
Signature
(entityId: EntityId, studyEventType: StudyEventType) => void
Parameters
Name | Type | Description |
---|---|---|
entityId | EntityId | study ID |
studyEventType | StudyEventType | study event type |
Returns
void
study_properties_changed
Study properties have changed.
Type
(id: EntityId) => void
Type declaration
Signature
(id: EntityId) => void
Parameters
Name | Type | Description |
---|---|---|
id | EntityId | entity ID |
Returns
void
toggle_header
Chart header is shown/hidden
Type
(isHidden: boolean) => void
Type declaration
Signature
(isHidden: boolean) => void
Parameters
Name | Type | Description |
---|---|---|
isHidden | boolean | is the chart header currently hidden |
Returns
void
toggle_sidebar
Drawing toolbar is shown/hidden
Type
(isHidden: boolean) => void
Type declaration
Signature
(isHidden: boolean) => void
Parameters
Name | Type | Description |
---|---|---|
isHidden | boolean | is the drawing toolbar currently hidden |
Returns
void
undo
Undo action occurred
Type
undo_redo_state_changed
The Undo / Redo state has been changed.
Type
(state: UndoRedoState) => void
Type declaration
Signature
(state: UndoRedoState) => void
Parameters
Name | Type | Description |
---|---|---|
state | UndoRedoState | state of the Undo/Redo stack |
Returns
void