Skip to content
EliteChart

ChartEventMap

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

code
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

code
[key: string]: /docs/api/core/interfaces/unknown

Properties

alert:create

code
alert:create: {
  id: string;
  price: Price;
};

Defined in: chart.ts:152

id

code
readonly id: string;

price

code
readonly price: Price;

alert:remove

code
alert:remove: {
  id: string;
};

Defined in: chart.ts:153

id

code
readonly id: string;

alert:trigger

code
alert:trigger: {
  id: string;
  price: Price;
  time: TimestampMs;
};

Defined in: chart.ts:154

id

code
readonly id: string;

price

code
readonly price: Price;

time

code
readonly time: TimestampMs;

alert:update

code
alert:update: {
  id: string;
  price: Price;
};

Defined in: chart.ts:155

id

code
readonly id: string;

price

code
readonly price: Price;

chart-context:copy-price

code
chart-context:copy-price: {
  price: Price;
};

Defined in: chart.ts:167

price

code
readonly price: Price;

chart-context:copy-time

code
chart-context:copy-time: {
  time: TimestampMs;
};

Defined in: chart.ts:168

time

code
readonly time: TimestampMs;

chart-context:manage-alerts

code
chart-context:manage-alerts: Record<string, never>;

Defined in: chart.ts:169


chart-context:settings

code
chart-context:settings: {
  price: Price | null;
  time: TimestampMs | null;
};

Defined in: chart.ts:166

price

code
readonly price: Price | null;

time

code
readonly time: TimestampMs | null;

compare:add

code
compare:add: {
  id: string;
  symbolId: string;
};

Defined in: chart.ts:163

id

code
readonly id: string;

symbolId

code
readonly symbolId: string;

compare:remove

code
compare:remove: {
  id: string;
};

Defined in: chart.ts:164

id

code
readonly id: string;

compare:update

code
compare:update: {
  id: string;
};

Defined in: chart.ts:165

id

code
readonly id: string;

corp-event:add

code
corp-event:add: {
  id: string;
  kind: CorporateEventKind;
};

Defined in: chart.ts:171

id

code
readonly id: string;

kind

code
readonly kind: CorporateEventKind;

corp-event:click

code
corp-event:click: {
  id: string;
  kind: CorporateEventKind;
  time: TimestampMs;
};

Defined in: chart.ts:173

id

code
readonly id: string;

kind

code
readonly kind: CorporateEventKind;

time

code
readonly time: TimestampMs;

corp-event:remove

code
corp-event:remove: {
  id: string;
};

Defined in: chart.ts:172

id

code
readonly id: string;

crosshair:move

code
crosshair:move: {
  price: Price | null;
  time: TimestampMs | null;
};

Defined in: chart.ts:144

price

code
readonly price: Price | null;

time

code
readonly time: TimestampMs | null;

draw:horizontal

code
draw:horizontal: {
  price: Price;
};

Defined in: chart.ts:181

price

code
readonly price: Price;

drawing:create

code
drawing:create: {
  id: string;
  toolId: string;
};

Defined in: chart.ts:148

id

code
readonly id: string;

toolId

code
readonly toolId: string;

drawing:delete

code
drawing:delete: {
  id: string;
  toolId: string;
};

Defined in: chart.ts:149

id

code
readonly id: string;

toolId

code
readonly toolId: string;

drawing:select

code
drawing:select: {
  id: string | null;
};

Defined in: chart.ts:150

id

code
readonly id: string | null;

error

code
error: {
  context: string;
  error: Error;
};

Defined in: chart.ts:182

context

code
readonly context: string;

error

code
readonly error: Error;

history:change

code
history:change: {
  canRedo: boolean;
  canUndo: boolean;
  size: number;
};

Defined in: chart.ts:151

canRedo

code
readonly canRedo: boolean;

canUndo

code
readonly canUndo: boolean;

size

code
readonly size: number;

layout:load

code
layout:load: {
  alertsCount: number;
  drawingsCount: number;
};

Defined in: chart.ts:162

alertsCount

code
readonly alertsCount: number;

drawingsCount

code
readonly drawingsCount: number;

longpress

code
longpress: {
  price: Price | null;
  time: TimestampMs | null;
};

Defined in: chart.ts:146

price

code
readonly price: Price | null;

time

code
readonly time: TimestampMs | null;

magnet:change

code
magnet:change: {
  mode: MagnetMode;
};

Defined in: chart.ts:170

mode

code
readonly mode: MagnetMode;

order:submit

code
order:submit: TradeOrder;

Defined in: chart.ts:180


replay:enter

code
replay:enter: {
  index: number;
};

Defined in: chart.ts:156

index

code
readonly index: number;

replay:exit

code
replay:exit: Record<string, never>;

Defined in: chart.ts:157


replay:pause

code
replay:pause: Record<string, never>;

Defined in: chart.ts:160


replay:play

code
replay:play: {
  speedMs: number;
};

Defined in: chart.ts:159

speedMs

code
readonly speedMs: number;

replay:range

code
replay:range: {
  fromIndex: number | null;
  toIndex: number | null;
};

Defined in: chart.ts:161

fromIndex

code
readonly fromIndex: number | null;

toIndex

code
readonly toIndex: number | null;

replay:step

code
replay:step: {
  index: number;
};

Defined in: chart.ts:158

index

code
readonly index: number;

theme:change

code
theme:change: {
  name: string;
};

Defined in: chart.ts:145

name

code
readonly name: string;

tool-mode:change

code
tool-mode:change: {
  toolId: string | null;
};

Defined in: chart.ts:147

toolId

code
readonly toolId: string | null;

trade:buy

code
trade:buy: {
  price: Price;
};

Defined in: chart.ts:178

price

code
readonly price: Price;

trade:sell

code
trade:sell: {
  price: Price;
};

Defined in: chart.ts:179

price

code
readonly price: Price;

viewport:change

code
viewport:change: {
  from: TimestampMs;
  to: TimestampMs;
};

Defined in: chart.ts:143

from

code
readonly from: TimestampMs;

to

code
readonly to: TimestampMs;