Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Finance and time

Candlestick chart

Daily candlesticks on a time axis with a 10-day moving average.

Candlestick chart

Code of this example · cargo run --release -p plot-candlestick


Technical indicators

Candlesticks with Bollinger bands, the RSI with its 30/70 levels and the MACD with its histogram, in panels that share the time axis and line up (in a window they also share a crosshair and zoom together), plus Heikin-Ashi candles.

Indicators Heikin-Ashi
#![allow(unused)]
fn main() {
ax.candlestick(&t, &open, &high, &low, &close);
ax.bollinger(&t, &close, 20, 2.0);
rsi_axes.rsi(&t, &close, 14);
macd_axes.macd(&t, &close, 12, 26, 9);
}

The indicator values are available as functions too: dataviz::plot::stats::{sma, ema, bollinger, rsi, macd, heikin_ashi}.

Code of this example · cargo run --release -p plot-indicators


Time series

Hourly data on a time axis, bars on a secondary y-axis, reference line and shaded span.

Time series

Code of this example · cargo run --release -p plot-time-series


Gantt chart

Project plan with progress on a time axis and a “today” marker.

Gantt chart

Code of this example · cargo run --release -p plot-gantt


Parallel coordinates and calendar heatmap

Iris-like data in parallel coordinates and a year of daily values as a calendar.

Parallel coordinates and calendar heatmap

Code of this example · cargo run --release -p plot-parallel-calendar