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 (viainner_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 defaultChartStyleimplementation.- reference_
line - Reference lines: the values a chart is about, drawn on it.
- style
- Chart design tokens — relocated from
theme.components.chartinto 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 forkteksilo-chartsor install a custom layout pass on top of these primitives.
Structs§
- Chart
Aggregate - A bucket/rollup projection over a
ChartModel<T>. - Chart
Datum - One numeric data point at a category/x-axis position, with an optional per-point color that overrides the series color (bar charts only).
- Chart
Model - A concrete reactive multi-series chart data model.
- Chart
Selection - Point-level selection state for a chart, keyed by
(series, point index). See module documentation for semantics. - Chart
Series - A named series of data points with an optional explicit color and a
visibility flag, used to construct a
ChartModel(viaChartModel::from_series_vec) or to describe one series’ desired shape. Unlike the model,visiblehere is a plainbool— reactivity lives in the model’sChartModel::structure_version/ChartModel::style_versionsignals, not in this construction DTO. - Chart
Window - A “last N points per series” streaming projection over a
ChartModel<T>. - Series
Id - Opaque identifier for a series in a
ChartModel. - Series
View - A read-only, borrowed view over one series — returned by
ChartModel::with_series_view/ChartModel::with_all_series.
Enums§
- Chart
Aggregate Fn - A reduction applied to the numeric values within one bucket.
- Chart
Source - A reactive chart input. Conversions retain shared handles and copy no points.
- Series
Hatch - How a filled region (a bar, an area, a pie slice) carries its series’
pattern.
Noneis a plain fill; the rest are line hatches at the named angle, drawn in a contrasting tone over the fill. - Series
Marker - 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.
- Series
Pattern - The non-colour visual channel identifying one chart series.