Skip to main content

Crate opsis

Crate opsis 

Source
Expand description

§opsis

Vega-style, TOML-driven plotting framework for Rust. One ChartSpec drives either an interactive desktop window (egui) or a terminal UI (ratatui).

use opsis::ChartSpec;

let spec = ChartSpec::from_toml_path("chart.toml")?;
opsis::show(spec)?;

See examples/configs/ for sample TOML and examples/ for runnable Rust demos.

Re-exports§

pub use config::Aggregate;
pub use config::ChannelType;
pub use config::ChartMeta;
pub use config::ChartSpec;
pub use config::ChartType;
pub use config::DataFormat;
pub use config::DataSource;
pub use config::Encoding;
pub use config::Mark;
pub use config::Style;
pub use data::Dataset;
pub use data::Record;
pub use data::Value;
pub use error::OpsisError;
pub use error::Result;

Modules§

config
data
error
render
Backend-agnostic helpers used by the egui and ratatui renderers.

Functions§

show
Open an egui window for the spec. Blocks until the window is closed.
show_path
Open an egui window from a TOML file path.
show_str
Open an egui window from a TOML string.
show_terminal
Render the chart in the terminal until the user presses q/Esc/Ctrl-C.
show_terminal_path
Same, from a TOML file.
show_terminal_str
Same, from a TOML string.