optionstratlib-visualization 0.23.1

Backend-neutral chart models, the Graph contract and its implementations for OptionStratLib types, with optional Plotly rendering and static export. Re-exported by the optionstratlib facade under its `visualization` feature.
Documentation
[package]
name = "optionstratlib-visualization"
version = "0.23.1"
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Backend-neutral chart models, the Graph contract and its implementations for OptionStratLib types, with optional Plotly rendering and static export. Re-exported by the optionstratlib facade under its `visualization` feature."
readme = "README.md"
keywords = ["finance", "options", "visualization", "charts", "plotly"]
categories = ["finance", "visualization"]
include = ["/src/**/*", "/assets/OpenSans-Regular.ttf", "/assets/OFL.txt", "/Cargo.toml", "/README.md", "/LICENSE"]

[features]
default = []
# Plotly rendering: `Graph::to_plot`, `write_html`, `show`, `render` and the
# trace builders. `plotly` is declared without `static_export_default`, so
# this feature resolves no WebDriver, image export or async runtime package
# (ADR-0002 section 3).
plotly = ["dep:plotly"]
# PNG and SVG export (`Graph::write_png`, `write_svg`), drawn natively with
# Plotters: no browser, WebDriver, network or installed font (#927). It
# still implies `plotly`, so a `static_export` build keeps the interactive
# API. The text is read from the bundled Open Sans (SIL OFL 1.1,
# `assets/OFL.txt`) with skrifa; Plotters has no font feature, so no
# ttf-parser is resolved.
static_export = [
    "plotly",
    "dep:plotters",
    "dep:plotters-backend",
    "dep:skrifa",
    "dep:ab_glyph_rasterizer",
]

[package.metadata.docs.rs]
# docs.rs builds the default features, empty for this crate, so name the
# optional ones the API documents. `static_export` builds like any other
# feature since its export went native (#927): no build script, browser,
# network or system font (the font ships in `assets/`). #930 recorded an
# offline, warnings-denied documentation build of exactly this selection.
features = ["plotly", "static_export"]

[dependencies]
optionstratlib-core = { workspace = true }
optionstratlib-math = { workspace = true }
optionstratlib-pricing = { workspace = true }
optionstratlib-simulation = { workspace = true }
optionstratlib-market = { workspace = true }
optionstratlib-strategies = { workspace = true }
optionstratlib-backtest = { workspace = true }
num-traits = { workspace = true }
plotly = { workspace = true, optional = true }
# The native PNG/SVG export (`static_export`), approved by the owner on
# 2026-10-19 (#926): Plotters without a font feature, its backend trait,
# skrifa for the bundled font and ab_glyph_rasterizer for PNG text.
plotters = { workspace = true, optional = true }
plotters-backend = { workspace = true, optional = true }
skrifa = { workspace = true, optional = true }
ab_glyph_rasterizer = { workspace = true, optional = true }
# Terminal tables for chain and simulation reports (`visualization::terminal`,
# M6-05): the presentation crate is their only owner, so no lower crate
# resolves a terminal-table package.
prettytable-rs = { workspace = true }
rust_decimal = { workspace = true }
serde = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
chrono = { workspace = true }
mockall = { workspace = true }
proptest = { workspace = true }
rust_decimal_macros = { workspace = true }
serde_json = { workspace = true }
static_assertions = "1.1"
tempfile = { workspace = true }
criterion = { workspace = true }
# Decodes PNGs in the native export tests; already in the tree through plotters.
png = "0.17.16"

[[bench]]
name = "visualization"
harness = false