RavenRS · Rust GUI

ChartReference

Edit and run the ChartReference RavenRS example in your browser. Explore its Rust code and download a Cargo project for desktop and WebAssembly.

One declarative Rust interface, GPU rendering, reactive state and semantic design tokens. Free and open source under MIT OR Apache-2.0.

Rust source

fn chart_reference() -> impl View {
    Chart::new(ChartKind::Bar)
        .categories(["Jan", "Feb", "Mar", "Apr", "May", "Jun"])
        .series("Sales", [12.0, 18.0, 15.0, 21.0, 19.0, 24.0])
        .show_value_axis()
        .grid_dashed()
        .value_domain(0.0, 25.0)
        .tooltip(ChartTooltip::new().value_format(|value| format!("{value:.0} units")))
        .reference(ChartReference::new(20.0).label("Target").color(Semantic::Warning))
        .height(260.0)
}

The interactive preview loads when JavaScript and WebGPU or WebGL2 are available. You can read the guide and examples here at any time.

More examples