Skip to content

Installation

This guide follows main (0.3 in development). Use Rust 1.95 or newer and egui/eframe 0.37 so both dependencies share the same egui types.

DocumentationDependencyegui / eframe
main API (rustdoc) · 0.3 in developmentGit, branch main0.37
Published 0.2.0 APIegui-charts = "0.2.0"0.33.3
  1. Create your application.

    Terminal window
    cargo new my-chart
    cd my-chart
  2. Choose your dependencies.

    Use the widget alone for a chart, the default features for a larger interface, or the headless engine for data processing without egui.

    Cargo.toml
    [dependencies]
    egui-charts = { git = "https://github.com/userFRM/egui-charts", branch = "main", default-features = false, features = ["widget"] }
    eframe = "0.37"
    chrono = "0.4"
  3. Check the setup.

    Terminal window
    cargo check

    Continue with your first chart to display bars in a native window.

FeatureWhat it enables
widgetThe egui chart, configuration and theme system
studiesBuilt-in studies and IndicatorFactory; also works headlessly
alert-engineservices::AlertEngine, which evaluates alerts on the bars the host feeds it; also works headlessly
detectorsservices::OrderFlowDetectors, which finds order-flow events in the trades and depth the host feeds it; also works headlessly
strategiesstrategies::Backtest, which runs a strategies::Strategy over bars and returns a StrategyReport; also works headlessly
httpdata::http::HttpDatafeed, HTTP column history, symbol search and live bar refresh from your server; also works headlessly
drawingsDrawing tools, interaction, undo and persistence; enables widget
iconsEmbedded SVG icons; enables widget
csvCSV import and export for bars, strategy reports and chart data
png-exportPNG image export and image textures in SVG export; enables widget
uiToolbars, panels, dialogs, ui_kit and extension helpers; enables icons, studies, drawings, csv and png-export
localesLocalized month and weekday names and AM/PM markers
timezonesIANA zones and daylight-saving rules
serdeSerialization for Theme

The defaults are ui, locales, timezones, csv and png-export. Omit default-features = false and the explicit feature list for that setup. Add studies or drawings to the widget-only list for those capabilities without the full application UI. Without default features, add csv or png-export for CSV or PNG methods. With icons alone, the chart installs only its embedded icon loader.

With default-features = false and no features, the headless engine provides models, data contracts, scales, services and the indicator trait layer without egui.

The widget runs in an egui host. The first chart uses eframe. The repository’s demo shows an eframe WebAssembly app built with Trunk. Host windowing, event loops, network runtimes and browser startup remain application concerns.