Expand description
Plugin interfaces: indicators, custom
series, layer plugins and series transforms, and MinMaxIndex for
plugins’ range queries.
Core schedules indicator computation, so the Indicator trait lives
here; ferrochart-indicators implements the built-in indicators. Each
output of an indicator is an ordinary value series of the chart
(crate::Chart::indicator_series); Indicator::update writes its
values straight into those series’ storage through IndicatorOutputs.
Structs§
- Indicator
Input - An indicator’s source series, slot by slot: slot
iis logical indexfirst + iof the time axis, over the logical indices the source covers. - Indicator
Outputs - Where
Indicator::updatewrites: for every output, the values of slotsstart()..len()of the input, all NaN before the call. - Input
Bar - One bar of an indicator’s source.
- Layer
Ctx - What a
LayerPluginknows about the chart. - MinMax
Index (min, max)pairs of a growing column with O(log n) range queries, O(log n)pushandset_last.- Output
Spec - One output of an indicator.
- Series
Ctx - What a
CustomSeriesknows about the chart while it draws. - Transform
Bar - One output element of a
SeriesTransform. - Transform
Output - Reused output buffer of a
SeriesTransformcall; clearing keeps the capacity, so a warmed-up buffer does not allocate.
Enums§
- Axis
Mode - How a custom series is placed on the time axis.
- Layer
Position - Where a layer plugin draws.
- Output
Kind - How an indicator output is drawn.
- Placement
- Where an indicator’s outputs are shown.
Constants§
- MAX_
OUTPUT_ PER_ CALL - Elements one
pushorpeekcall may write.
Traits§
- Custom
Series - A series that owns its data.
- Indicator
- A technical indicator, computed incrementally by the chart when its source series changes.
- Layer
Plugin - Extra drawing on a pane or on the whole chart.
- Series
Transform - Turns input bars into a new series, with the peek/push model of
indicators: the output is the elements
pushwrote for every input but the last (finished, never changed again) followed by whatpeekwrites for the last input (the elements it would finish and the ones still forming). Gap bars are never passed in.