Skip to content
EliteChart

Corporate events

Dividend + split markers — render below the time axis, snap to bars, surface metadata in tooltips.

A corporate event is anything outside the price stream that affects the security — dividends, stock splits, mergers, ticker renames. The chart paints these as small markers below the time axis, hover-tooltipped with the event details.

Quick example

code
import { useChartStore } from '@elitechart/elitechart';

useChartStore.getState().setEvents([
  { kind: 'dividend',  time: 1700_000_000_000, amount: 0.24 },
  { kind: 'split',     time: 1702_500_000_000, ratio: '4-for-1' },
  { kind: 'rename',    time: 1704_900_000_000, from: 'FB', to: 'META' },
]);

How it works

Events are sourced from the datafeed, not the chart. Your Datafeed returns them on demand from a method that ships in Phase 1b — getEvents(symbol, from, to). EliteChart keeps a per-symbol cache; on a viewport change it requests the slice it doesn't already have.

Markers paint below the time axis at the bar matching the event's timestamp. Hover (or focus + arrow) opens a tooltip with the event's fields.

Event shapes

code
type CorporateEvent =
  | { kind: 'dividend'; time: TimestampMs; amount: number }
  | { kind: 'split';    time: TimestampMs; ratio: string }
  | { kind: 'rename';   time: TimestampMs; from: string; to: string }
  | { kind: 'merger';   time: TimestampMs; with: string };

Variations

Hide markers but keep them in store

code
useChartStore.getState().setEventsVisible(false);

Filter by kind

code
useChartStore.getState().setEventFilter(['dividend']);

API

ActionMethod
Set eventsuseChartStore.setEvents(events)
Toggle visibleuseChartStore.setEventsVisible(bool)
FilteruseChartStore.setEventFilter(kinds)
Datafeed sourceDatafeed.getEvents(symbol, from, to)