
Chart | Data shape | Use when |
|---|---|---|
Label/value pairs with rose area mode. | Use it when small values should remain visible. | |
One bounded value. | Use it for operational capacity panels. | |
Label/value pairs in polar coordinates. | Use it for cyclical categories. | |
Label/value pairs plus inner radius. | Use it when the total belongs in the center of the chart. | |
Label/value pairs. | Use it for small composition snapshots. | |
Label/value pairs plus inner radius. | Use it when a central status label will be added by surrounding UI. | |
Label/value pairs with rose radius mode. | Use it for presentation views with few categories. | |
Vec<Vec<f32>> metric profiles. | Use it for capability or budget profiles. | |
Vec<Vec<f32>> metric profiles. | Use it when the profile shape matters. | |
One label/value pair. | Use it for health or readiness scores. | |
Label/value pairs plus inner radius. | Use it for compact composition summaries. | |
Angle/radius samples. | Use it for direction and magnitude data. |
use fission::prelude::*;
use fission::charts::{Axis, Chart, LineSeries};
pub struct PieAndRadialChart;
impl From<PieAndRadialChart> for Widget {
fn from(_: PieAndRadialChart) -> Widget {
Chart::new()
.title("Pie and radial")
.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. |