facett-plotters — the chart types egui_plot
(→ facett-plot) lacks, painted in immediate mode directly on an
[egui::Painter]. egui_plot already covers line/scatter/bar/histogram with
zoom/pan; this crate fills the analytics long-tail Plotly defines:
- [
BoxPlotView] — quartiles + 1.5·IQR whiskers + outliers - [
ViolinView] — Gaussian-KDE density silhouette - [
HeatmapView] — a matrix as a colour grid with a gradient legend - [
CandlestickView] — OHLC bars (wick + body) - [
TreemapView] — weighted slice-and-dice rectangles
Why hand-rolled, not the plotters crate
The plotters crate is retained + raster/SVG-backend driven: its egui
integration renders to a bitmap and blits a texture every frame, with no
immediate-mode hit-testing, no live theming, and no hover model. facett's
charts must read [facett_core::theme] live (re-skin on theme switch),
expose cheap hover-readouts, and implement the Facet
contract (caps() + copy() → CSV). Hand-painting on the egui Painter
(the same path facett-core/facett-map use) is the lighter, better-fitting
choice — so plotters is not a dependency.
Theme-derived colour ramps
No palette is hardcoded. [ramp::Ramp] builds a sequential
(bg→accent→glow) or diverging (accent→text_dim→glow) ramp
purely from the active Theme, so heatmaps/treemaps
follow whatever theme is set.
Each view is a Facet: it declares
caps().themeable().copyable().resizable(), paints itself, and copy()
emits the underlying data as CSV. The data→geometry math (quartiles, KDE
bins, OHLC mapping, heatmap cell layout, treemap squarify) lives in pure,
tested functions that need no GPU.