Skip to main content

Module plugin

Module plugin 

Source
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§

IndicatorInput
An indicator’s source series, slot by slot: slot i is logical index first + i of the time axis, over the logical indices the source covers.
IndicatorOutputs
Where Indicator::update writes: for every output, the values of slots start()..len() of the input, all NaN before the call.
InputBar
One bar of an indicator’s source.
LayerCtx
What a LayerPlugin knows about the chart.
MinMaxIndex
(min, max) pairs of a growing column with O(log n) range queries, O(log n) push and set_last.
OutputSpec
One output of an indicator.
SeriesCtx
What a CustomSeries knows about the chart while it draws.
TransformBar
One output element of a SeriesTransform.
TransformOutput
Reused output buffer of a SeriesTransform call; clearing keeps the capacity, so a warmed-up buffer does not allocate.

Enums§

AxisMode
How a custom series is placed on the time axis.
LayerPosition
Where a layer plugin draws.
OutputKind
How an indicator output is drawn.
Placement
Where an indicator’s outputs are shown.

Constants§

MAX_OUTPUT_PER_CALL
Elements one push or peek call may write.

Traits§

CustomSeries
A series that owns its data.
Indicator
A technical indicator, computed incrementally by the chart when its source series changes.
LayerPlugin
Extra drawing on a pane or on the whole chart.
SeriesTransform
Turns input bars into a new series, with the peek/push model of indicators: the output is the elements push wrote for every input but the last (finished, never changed again) followed by what peek writes for the last input (the elements it would finish and the ones still forming). Gap bars are never passed in.