Chart types and series
Choose a renderer for the data your application has. A renderer changes how a series is drawn; it does not fetch history, subscribe to a market or change the feed’s interval. Start with the series guide for data, styling, identity and lifecycle, then try a family:
- Candles and bars: OHLC, hollow and volume candles, and high-low.
- Line: straight, stepped and marked scalar plots.
- Area: scalar fills and high-low-close bands.
- Baseline: separate colours and fills around a reference.
- Histogram and columns: one value per column and an explicit base.
- Transforms: Heikin-Ashi, Renko, Kagi, Line Break, Point and Figure, and range bars.
Inputs for every main chart type
Section titled “Inputs for every main chart type”All bar series use Bar.
For a scalar, Bar::from_value
sets all four prices to that value and volume to zero. For OHLC, pass valid
open, high, low and close prices to Bar::new;
use zero volume when it is unavailable. Every ordinary bar still needs finite
prices, consistent high/low bounds and finite, nonnegative volume, even if its
renderer reads fewer fields.
The names below are the exact ChartType
variants. “Added” describes SeriesOptions::chart_type on a normal time-based main chart.
| Main type | Required input and interpretation | Added series |
|---|---|---|
Candles | OHLC; body from open to close, wick from low to high | Supported |
Bars | OHLC; high-low stem with open/close ticks | Supported |
HollowCandles | OHLC; hollow when close is above open | Supported |
VolumeCandles | OHLC plus meaningful bar volume for body width | Supported |
HighLow | High and low; supply a valid OHLC bar | Supported |
Line | Scalar, or selected price of an OHLC bar; close by default | Supported; uses close |
LineWithMarkers | Same as Line, with a marker at each point | Supported; uses close |
StepLine | Same as Line, joined horizontally then vertically | Supported; uses close |
Area | Scalar, or selected price of an OHLC bar; close by default | Supported; uses close |
HlcArea | High, low and close; supply a valid OHLC bar | Supported |
Baseline | Scalar, or selected price of an OHLC bar, and a reference level | Supported; close, base at 50% of pane |
Columns | Scalar in close; bar volume is not the plotted value | Supported |
Heikin | Original OHLC history; computes smoothed candles over the full history | Supported |
Renko | Close or high/low history, brick size and size method | Converted to Line |
Kagi | Close or high/low history, reversal size and size method | Converted to Line |
LineBreak | Close or high/low history and reversal lookback | Converted to Line |
PointAndFigure | High/low by default, or close; box size, size method and reversal count | Converted to Line |
Range | Executions when retained; otherwise an OHLC path approximation; range size | Converted to Line |
TimePriceOpportunity | Timestamped OHLC ranges, session rules and TPO row/period settings; counts time at price | Converted to Line |
VolumeFootprint | Executions with aggressor side, instrument tick size and a time-based interval, plus bars | Candles only |
SessionVolumeProfile | Same execution inputs as footprint, session rules and the studies feature | Candles only |
The order-flow guide explains execution history,
aggressor sides, tick sizes, session profiles and TPO. OHLCV totals do not contain
executions at each price. The execution renderers draw candles without the
required inputs and for bars before complete execution coverage. The oldest
retained trade’s bar is complete only when the feed reports that no older trades
exist. Session Volume Profile also draws candles without studies.
Select the main renderer
Section titled “Select the main renderer”use egui_charts::{Chart, ChartType, model::BarData};
let mut chart = Chart::new(BarData::new());chart.set_chart_type(ChartType::Line);Chart::set_chart_type
keeps the source bars. Change parameters with
Chart::set_chart_type_params
and ChartTypeParams.
Keep the chart alive between frames; see your first chart.
Added-series restrictions
Section titled “Added-series restrictions”Chart::add_series
adds a host-fed bar series. Its
SeriesOptions::chart_type
converts Renko, Kagi, Range, Line Break, Point and Figure, and TPO to Line.
Read the effective settings back with
Chart::series.
Footprint and Session Volume Profile are accepted as options but the added-series
renderer draws their bars as candles; it does not build a second execution view.
Added series share the main time axis, including its whitespace slots. Supply the main history, or explicit whitespace, to cover their timestamps. On a time-independent main chart, added series are retained but hidden; their bar timestamps cannot share the brick or column axis. Transforms explains the other overlays hidden on that axis. Use the series lifecycle to retain and update each series by id, and scales to choose its price scale.