Skip to main content

Economic events

DXcharts supports multiple types of business-related events, displayed along the chart's X-axis.

Supported event types include:

  • Earnings
  • Dividends
  • Splits
  • Conference calls

Use the Events component API (available via chart.events) to display and configure event markers on the chart.

Adding events

Use chart.events.setEvents to add events to the chart:


Visibility

Use chart.events.setVisible to change visibility.

Interaction

You can subscribe to hover events using chart.events.observeEventHovered:


Customizing appearance

Event icons

You can override event icons using the chart.config.components.events.icons configuration.

Each event type has two icon states: normal and hover. Be sure to define both if overriding.

Custom icon example

Label formatting

To customize event labels, set a formatter in the configuration:

After applying a formatter, events will display the updated labels:

Configuration reference

Events configuration

ChartConfigComponentsEvents

Property
Description
Type

visible

Toggle events visibility.
boolean

eventsVisibility

Toggle specific event type visibility (for example: dividends, splits, earnings).
Record<EventType, boolean>

height

Height of events area in pixels
number

cursor

Configure events cursor type.
string

xAxisLabelFormat

Configure x axis labels
DateTimeFormatConfig[]

Events color configuration

ChartConfigComponentsEventsColors

Property
Description
Type

Events component methods

Further reading