Expand description
Multi-chart sync: crosshair time, visible time range and drawings.
A SyncGroup is a small shared bus (Arc<Mutex<_>>) with one slot per
kind of message, holding the latest message and who sent it. A chart that
joined a group posts the changes the user (or the host’s API calls) made to
it, and picks up the other members’ messages when it builds a frame;
Chart::needs_redraw reports pending messages, so hosts drive synced
charts exactly like single ones. Each posted message is also reported as
ChartEvent::Sync for hosts that forward messages themselves (charts in
different workers or processes) with Chart::apply_sync.
Messages are anchored by time, not logical index, so charts of different symbols or intervals stay aligned. Applying a message never posts it again, so messages cannot bounce between charts.
Drawings (opt-in, SyncOptions::drawings) travel as DrawingSyncOps
through a bounded queue on the bus; see drawings.
Re-exports§
pub use drawings::DrawingSyncOp;pub use drawings::SyncKey;
Modules§
- drawings
- Drawing sync between charts of the same symbol.
Structs§
- Sync
Group - A group of synced charts. Cloning gives another handle to the same group.
- Sync
Options - What a chart shares with its group.
Enums§
- Sync
Message - A message between synced charts.