
Chart | Data shape | Use when |
|---|---|---|
Label/value pairs plus inner radius. | Present a flat composition; the centre label or total must be supplied separately. | |
Metric profiles, filled by the renderer. | Compare a few profiles whilst keeping their named values available. | |
One label/value pair with an expected range. | Use it when the value is read as a current instrument state. | |
One fraction from 0 to 1; only the first entry is rendered. | Show a genuinely bounded level, with missing readings handled separately. | |
Label/value pairs. | Use it for a small number of categories where the whole matters. | |
One percentage on a fixed 0–100 arc. | Show measured completion only when the total work is known. | |
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::{Chart, GaugeSeries};
// The parent resolves display labels from its translation bundles.
fission_component! {
pub QuotaOverviewGauge<()> {
props {
chart_title: String,
series_label: String,
value_label: String,
used_percent: f32,
}
}
view(report, _state, _cx) => Chart(
title: Some(report.chart_title.clone()),
series: vec![GaugeSeries::new(&report.series_label)
.data(vec![(&report.value_label, report.used_percent)])
.into()],
)
}