ECharts.Events (echarts v0.1.1)

Copy Markdown View Source

Names of the ECharts browser events that the integrations can forward.

Every name works with the :events option of ECharts.new/2. Pass :all to forward all of the events listed by all/0, or pass an explicit list to keep the event traffic minimal.

chart = ECharts.new(option, events: [:click, :datazoom])
ECharts.new(option, events: :all)

The payload delivered to LiveView (handle_event/3) and to Livebook subscribers is a map with "type" (the event name) and "data" (a JSON-safe summary of the ECharts parameters). The summary keeps the fields that are useful for interaction — seriesIndex, seriesName, name, dataIndex, data, value, percent, start, end, selected — plus the cursor position as "x"/"y" when the browser event provides it.

Summary

Functions

Returns every event name known to this library.

Returns the default events forwarded by the integrations.

Functions

all()

@spec all() :: [String.t()]

Returns every event name known to this library.

defaults()

@spec defaults() :: [String.t()]

Returns the default events forwarded by the integrations.