
Chart | Data shape | Use when |
|---|---|---|
Several named measures sharing ordered categories. | Use it when the data pipeline should stay visible instead of hidden in chart-specific arrays. | |
Small list of highlighted x/y samples. | Use it when outliers or active alerts need immediate attention. | |
Point samples plus a brush rectangle. | Use it when users need to select a region before drilling into data. | |
Category labels plus numeric values and a symbol choice. | Use it for unit counts that benefit from a branded or icon-like visual form. | |
Label/value pairs mapped around a circle. | Use it for cyclic or radial score comparisons. | |
Several same-length vectors across named indicators. | Use it for multidimensional status summaries. | |
Stage/value pairs ordered by process position. | Use it when the loss between stages matters more than exact axis measurement. | |
Single label/value pair scaled into a gauge arc. | Use it for scorecards where the main result should be immediately visible. | |
Position/value pairs on one continuous axis. | Use it for timelines or compact event strips. | |
Single label/value pair in a known range. | Use it for operational status values where one number dominates the view. | |
Ordered samples plus toolbox action configuration. | Use it when zoom, brush, restore, and export controls belong with the chart. | |
Records with category, group, and numeric value fields. | Use it when chart code should name fields once and reuse them across bar variants. | |
Records with ordered label, measure, and series fields. | Use it when the same dataset powers several line views. | |
Date/value pairs over a calendar range. | Use it to show daily volume, incidents, or activity in a compact year-like shape. | |
Grid cell coordinates with numeric intensity. | Use it for dense comparisons where color communicates rank faster than labels. | |
Triples of x, y, and magnitude values. | Use it when density and magnitude both matter. |
use fission::prelude::*;
use fission::charts::{Axis, Chart, LineSeries};
pub struct DatasetAndDynamicChart;
impl From<DatasetAndDynamicChart> for Widget {
fn from(_: DatasetAndDynamicChart) -> Widget {
Chart::new()
.title("Dataset and dynamic")
.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. |