Skip to content
Rust · egui 0.37 · main

Financial charts.
Your data.

Interactive financial charts for Rust and egui, built around your historical and streaming data.
SAMPLE Synthetic dataOpen full demo

Pan, zoom, explore. Your application supplies the real data.

FROM BARS TO A CHART

A widget in your application.

Create a chart once, give it your bars, and show it on every egui frame. The same Rust code runs natively and in WebAssembly.

This guide follows main (0.3 in development), using egui/eframe 0.37. Install the Git dependency below. Published release 0.2.0 uses egui/eframe 0.33.3.

Build your first chart
Terminal window
cargo add egui-charts --git https://github.com/userFRM/egui-charts --branch main
cargo add eframe@0.37 chrono@0.4
src/main.rs
// src/main.rs
use chrono::{TimeDelta, Utc};
use eframe::egui;
use egui_charts::{Chart, model::{Bar, BarData}};
fn main() -> eframe::Result {
let start = Utc::now() - TimeDelta::minutes(2);
let bars = vec![
Bar::new(start, 100.0, 103.0, 99.0, 102.0, 800.0),
Bar::new(start + TimeDelta::minutes(1),
102.0, 104.0, 101.0, 103.0, 600.0),
];
let mut chart = Chart::new(BarData::from_bars(bars));
chart.set_symbol("SAMPLE");
eframe::run_ui_native("My chart", Default::default(), move |ui, _| {
egui::CentralPanel::default().show(ui, |ui| chart.show(ui));
})
}

Your application owns market data connections, credentials, accounts and storage. egui-charts supplies the chart, analysis and host interfaces.