Documentation
Documentation / @elitechart/core / ChartEventMap
Defined in: chart.ts:142
Event payloads emitted by ChartHandle. Subscribe via
chart.on('event-name', handler).
Indexable string-event keys are documented inline; payload shapes are
the value types.
Example
chart.on('crosshair:move', ({ time, price }) => {
if (time !== null && price !== null) updateLegend(time, price);
});
chart.on('drawing:create', ({ id, toolId }) => persist(id, toolId));
chart.on('alert:trigger', ({ id, price }) => notify(`alert ${id} hit ${price}`));
Indexable
[key: string]: /docs/api/core/interfaces/unknown
Properties
alert:create
alert:create: {
id: string;
price: Price;
};
Defined in: chart.ts:152
id
price
alert:remove
alert:remove: {
id: string;
};
Defined in: chart.ts:153
id
alert:trigger
alert:trigger: {
id: string;
price: Price;
time: TimestampMs;
};
Defined in: chart.ts:154
id
price
time
readonly time: TimestampMs;
alert:update
alert:update: {
id: string;
price: Price;
};
Defined in: chart.ts:155
id
price
chart-context:copy-price
chart-context:copy-price: {
price: Price;
};
Defined in: chart.ts:167
price
chart-context:copy-time
chart-context:copy-time: {
time: TimestampMs;
};
Defined in: chart.ts:168
time
readonly time: TimestampMs;
chart-context:manage-alerts
chart-context:manage-alerts: Record<string, never>;
Defined in: chart.ts:169
chart-context:settings
chart-context:settings: {
price: Price | null;
time: TimestampMs | null;
};
Defined in: chart.ts:166
price
readonly price: Price | null;
time
readonly time: TimestampMs | null;
compare:add
compare:add: {
id: string;
symbolId: string;
};
Defined in: chart.ts:163
id
symbolId
readonly symbolId: string;
compare:remove
compare:remove: {
id: string;
};
Defined in: chart.ts:164
id
compare:update
compare:update: {
id: string;
};
Defined in: chart.ts:165
id
corp-event:add
corp-event:add: {
id: string;
kind: CorporateEventKind;
};
Defined in: chart.ts:171
id
kind
readonly kind: CorporateEventKind;
corp-event:click
corp-event:click: {
id: string;
kind: CorporateEventKind;
time: TimestampMs;
};
Defined in: chart.ts:173
id
kind
readonly kind: CorporateEventKind;
time
readonly time: TimestampMs;
corp-event:remove
corp-event:remove: {
id: string;
};
Defined in: chart.ts:172
id
crosshair:move
crosshair:move: {
price: Price | null;
time: TimestampMs | null;
};
Defined in: chart.ts:144
price
readonly price: Price | null;
time
readonly time: TimestampMs | null;
draw:horizontal
draw:horizontal: {
price: Price;
};
Defined in: chart.ts:181
price
drawing:create
drawing:create: {
id: string;
toolId: string;
};
Defined in: chart.ts:148
id
drawing:delete
drawing:delete: {
id: string;
toolId: string;
};
Defined in: chart.ts:149
id
drawing:select
drawing:select: {
id: string | null;
};
Defined in: chart.ts:150
id
readonly id: string | null;
error
error: {
context: string;
error: Error;
};
Defined in: chart.ts:182
context
readonly context: string;
error
history:change
history:change: {
canRedo: boolean;
canUndo: boolean;
size: number;
};
Defined in: chart.ts:151
canRedo
readonly canRedo: boolean;
canUndo
readonly canUndo: boolean;
size
layout:load
layout:load: {
alertsCount: number;
drawingsCount: number;
};
Defined in: chart.ts:162
alertsCount
readonly alertsCount: number;
drawingsCount
readonly drawingsCount: number;
longpress
longpress: {
price: Price | null;
time: TimestampMs | null;
};
Defined in: chart.ts:146
price
readonly price: Price | null;
time
readonly time: TimestampMs | null;
magnet:change
magnet:change: {
mode: MagnetMode;
};
Defined in: chart.ts:170
mode
readonly mode: MagnetMode;
order:submit
order:submit: TradeOrder;
Defined in: chart.ts:180
replay:enter
replay:enter: {
index: number;
};
Defined in: chart.ts:156
index
replay:exit
replay:exit: Record<string, never>;
Defined in: chart.ts:157
replay:pause
replay:pause: Record<string, never>;
Defined in: chart.ts:160
replay:play
replay:play: {
speedMs: number;
};
Defined in: chart.ts:159
speedMs
readonly speedMs: number;
replay:range
replay:range: {
fromIndex: number | null;
toIndex: number | null;
};
Defined in: chart.ts:161
fromIndex
readonly fromIndex: number | null;
toIndex
readonly toIndex: number | null;
replay:step
replay:step: {
index: number;
};
Defined in: chart.ts:158
index
theme:change
theme:change: {
name: string;
};
Defined in: chart.ts:145
name
tool-mode:change: {
toolId: string | null;
};
Defined in: chart.ts:147
readonly toolId: string | null;
trade:buy
trade:buy: {
price: Price;
};
Defined in: chart.ts:178
price
trade:sell
trade:sell: {
price: Price;
};
Defined in: chart.ts:179
price
viewport:change
viewport:change: {
from: TimestampMs;
to: TimestampMs;
};
Defined in: chart.ts:143
from
readonly from: TimestampMs;
to
readonly to: TimestampMs;