
Chart | Data shape | Use when |
|---|---|---|
Acquisition values over time. | Use it for growth dashboards. | |
One score value in a bounded range. | Use it for primary scorecards. | |
Channel values stacked by category. | Use it for acquisition mix. | |
Cohort matrix values. | Use it for retention and cohort intensity. | |
Ordered conversion stage values. | Use it for product funnel analysis. | |
Device values in a donut chart. | Use it when device share matters. | |
Daily engagement values. | Use it for engagement consistency over time. | |
Map plus route lines. | Use it for spatial engagement flows. | |
Feature values in a hierarchy. | Use it for feature usage share. | |
Journey nodes and links. | Use it for relationship-heavy behavior views. | |
Journey stages and flow links. | Use it for user movement between stages. | |
Label/value market share pairs. | Use it for small whole comparisons. | |
Portfolio hierarchy in radial layers. | Use it for hierarchical portfolio composition. | |
Product dimensions as profile vectors. | Use it to compare product health dimensions. | |
Sales values by named region. | Use it for geographic sales analysis. | |
Chart with report actions. | Use it when analytics views need built-in controls. | |
Retention values with area fill. | Use it when volume and trend both matter. | |
Segment x, y, and value triples. | Use it for multidimensional segment comparison. | |
Segment rows across several dimensions. | Use it for segment tradeoff analysis. | |
Source values over time. | Use it for changing source composition. |
use fission::prelude::*;
use fission::charts::{Axis, Chart, LineSeries};
pub struct AnalyticsChart;
impl From<AnalyticsChart> for Widget {
fn from(_: AnalyticsChart) -> Widget {
Chart::new()
.title("Analytics")
.x_axis(Axis::category(vec!["A", "B", "C"]))
.y_axis(Axis::value())
.series(vec![LineSeries::new("Series").data(vec![1.0, 2.0, 3.0]).into()])
.into()
}
}
Area | What to decide | How to verify |
|---|---|---|
Data shape | Keep source rows in typed Rust structs, then map them into the series type shown in the example. | Unit test the mapping separately from rendering. |
Options | Choose axes, legends, labels, animation, and interaction based on the user's task. | Add a screenshot test when changing visual behavior. |
Accessibility | Provide a clear title and adjacent summary text for important trends or outliers. | Inspect the generated semantics and make sure the chart is understandable without color alone. |
Failure handling | Render an empty, loading, or error state before constructing the chart if data is unavailable. | Test empty data, partial data, and failed fetches. |
Performance | Prefer summarized or windowed data for very large datasets; keep full raw history in the data layer. | Profile frame time and interaction latency with representative data volumes. |