
Chart | Data shape | Use when |
|---|---|---|
Label/value pairs plus inner radius. | Use it when the whole needs a central value or status. | |
Metric profiles plus fill style. | Use it when profile area and overlap should be visible. | |
One label/value pair with an expected range. | Use it when the value is read as a current instrument state. | |
One or more percentages. | Use it for capacity, completion, or quota states. | |
Label/value pairs. | Use it for a small number of categories where the whole matters. | |
One or more bounded values. | Use it for operational progress and service health panels. | |
Vec<Vec<f32>> where each row is one profile. | Use it for profile comparison across a fixed set of dimensions. | |
Label/value pairs plus area rose mode. | Use it when rose slices should emphasize difference without making small values disappear. | |
Label/value pairs plus radius rose mode. | Use it for presentation-heavy part-to-whole views. |
use fission::prelude::*;
use fission::charts::{Axis, Chart, LineSeries};
pub struct RadialAndPolarChart;
impl From<RadialAndPolarChart> for Widget {
fn from(_: RadialAndPolarChart) -> Widget {
Chart::new()
.title("Radial and polar")
.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. |