Skip to main content

Crate teksilo_charts

Crate teksilo_charts 

Source
Expand description

teksilo-charts — BarChart, LineChart, and PieChart for Teksilo.

All three render via the existing teksilo_canvas Path / fill_rect / draw_line API and integrate with the standard widget tree, signal / prop binding, and theme system.

  • BarChart — vertical or horizontal bars, single or grouped series.
  • LineChart — points connected by polylines, optional area fill and per-point hover tooltips.
  • PieChart — pie or donut (via inner_radius_ratio), with an optional center widget slot for donut total / icon / drilldown.

Series data lives in a teksilo_data::ChartModel — the reactive, multi-series data model shared by all three chart widgets (mirroring ListModel/TreeModel in shape). T is the category / x-axis type. Numeric values are always f32. Default series colors come from ChartPalette::FromTheme, which reads the active theme’s chart_palette (Okabe-Ito by default). Per-datum marks are exposed to assistive technology as synthetic AT nodes and are the basis of the hover/selection hit-testing shared across the three chart kinds.

Re-exports§

pub use axis::AxisConfig;
pub use axis::auto_tick_count;
pub use axis::nice_ticks;
pub use bar_chart::BarChart;
pub use bar_chart::BarGrouping;
pub use bar_chart::BarOrientation;
pub use layout::LegendPosition;
pub use legend::ChartLegend;
pub use legend::LegendOrientation;
pub use line_chart::LineChart;
pub use palette::ChartPalette;
pub use pattern::LegendSwatch;
pub use pattern::PatternPolicy;
pub use pie_chart::PieChart;
pub use pie_chart::PieLabelMode;
pub use recipe_style::RecipeChartStyle;

Modules§

axis
Axis configuration and tick generation.
bar_chart
BarChart — vertical or horizontal bars, one or more series.
layout
Shared plot-area layout math used by BarChart, LineChart and PieChart.
legend
ChartLegend — series swatch + label list, model-backed.
line_chart
LineChart — points connected by polylines, single or multi-series.
palette
Series color palette resolution.
pattern
Drawing the non-colour series channel — WCAG 1.4.1.
pie_chart
PieChart — circular value slices.
recipe_style
RecipeChartStyle — the default ChartStyle implementation.
reference_line
Reference lines: the values a chart is about, drawn on it.
style
Chart design tokens — relocated from theme.components.chart into this standalone module. Charts pull their colours from theme roles + ColorTokens::chart_palette; this module only carries dimensions. Themes that want to nudge density either fork teksilo-charts or install a custom layout pass on top of these primitives.

Structs§

ChartAggregate
A bucket/rollup projection over a ChartModel<T>.
ChartDatum
One numeric data point at a category/x-axis position, with an optional per-point color that overrides the series color (bar charts only).
ChartModel
A concrete reactive multi-series chart data model.
ChartSelection
Point-level selection state for a chart, keyed by (series, point index). See module documentation for semantics.
ChartSeries
A named series of data points with an optional explicit color and a visibility flag, used to construct a ChartModel (via ChartModel::from_series_vec) or to describe one series’ desired shape. Unlike the model, visible here is a plain bool — reactivity lives in the model’s ChartModel::structure_version / ChartModel::style_version signals, not in this construction DTO.
ChartWindow
A “last N points per series” streaming projection over a ChartModel<T>.
SeriesId
Opaque identifier for a series in a ChartModel.
SeriesView
A read-only, borrowed view over one series — returned by ChartModel::with_series_view / ChartModel::with_all_series.

Enums§

ChartAggregateFn
A reduction applied to the numeric values within one bucket.
ChartSource
A reactive chart input. Conversions retain shared handles and copy no points.
SeriesHatch
How a filled region (a bar, an area, a pie slice) carries its series’ pattern. None is a plain fill; the rest are line hatches at the named angle, drawn in a contrasting tone over the fill.
SeriesMarker
The marker glyph drawn at a line chart’s data points, and next to a series in a legend. Shape, not colour — that is the whole point.
SeriesPattern
The non-colour visual channel identifying one chart series.