
Chart | Data shape | Use when |
|---|---|---|
Five-number rows; raw groups use a separate calculation helper. | Use it when distribution matters more than a single average. | |
Vec<(x, y, size)>. | Use it when two axes are not enough and size can encode importance or volume. | |
Rows of open, close, low, high values. | Use it for finance and other range-over-time data. | |
x index, y index, and value triples. | Use it for density, activity, and matrix-style comparison. | |
Vec<(f32, f32)> plus emphasis styling. | Use it to mark active locations, alerts, or selected results. | |
Vec<(f32, f32)>. | Inspect paired observations; analysis and classification remain explicit. |
use fission::prelude::*;
use fission::charts::{Axis, BoxplotSeries, Chart};
// The parent resolves display labels from its translation bundles.
fission_component! {
pub DeliveryDistributionOverview<()> {
props {
chart_title: String,
series_label: String,
axis_label: String,
group_labels: Vec<String>,
summaries: Vec<[f32; 5]>,
}
}
view(report, _state, _cx) {
let labels = report.group_labels.iter().map(String::as_str).collect();
let rows = report.summaries.iter().map(|summary| summary.to_vec()).collect();
} => Chart(
title: Some(report.chart_title.clone()),
x_axis: Some(Axis::category(labels)),
y_axis: Some(Axis::value().name(&report.axis_label)),
series: vec![BoxplotSeries::new(&report.series_label).data(rows).into()],
)
}