Grouped quarterly bars

A quarter-to-quarter change can be seasonal rather than a change in the business. Putting the same quarter from two years side by side helps separate those questions. The category identifies the quarter; the series identifies the year.
Keep reporting boundaries consistent. Comparing a complete quarter with a quarter still in progress needs an explicit qualification, not simply another bar with a smaller value.

Compose example

Each row holds both years for one quarter. The order supplied by the parent should be calendar order, not a sort by the largest result.
use fission::prelude::*;
use fission::charts::{Axis, BarSeries, Chart, Legend, Series};

#[derive(Clone)]
pub struct QuarterComparison {
    pub quarter: String,
    pub previous_year: f32,
    pub current_year: f32,
}

fission_component! {
    pub QuarterlyOrdersChart<()> {
        props {
            title: String,
            previous_year_label: String,
            current_year_label: String,
            rows: Vec<QuarterComparison>,
        }
    }
    view(report, _state, _cx) {
        let quarters = report.rows.iter().map(|row| row.quarter.as_str()).collect();
        let previous = report.rows.iter().map(|row| row.previous_year).collect();
        let current = report.rows.iter().map(|row| row.current_year).collect();
    } => Chart(
        title: Some(report.title.clone()),
        x_axis: Some(Axis::category(quarters)),
        y_axis: Some(Axis::value().min(0.0)),
        legend: Some(Legend::top_right()),
        series: vec![
            Series::Bar(BarSeries::new(&report.previous_year_label).data(previous)),
            Series::Bar(BarSeries::new(&report.current_year_label).data(current)),
        ],
    )
}
Enable the charts feature. Each BarSeries receives values in category order. Leaving stack unset gives the bars a common zero baseline; stacking the two years would produce a combined value rather than a direct comparison.
The parent provides translated labels and finite display values calculated from its order records. Missing quarters must be represented as unavailable in the reporting UI rather than filled with invented zeroes.

Checks

Test the quarter-to-year alignment, accounting for the application's fiscal calendar. Keep exact counts available in an accessible table and identify both years in the legend rather than relying on colour.
Inspect the rendered chart with the longest translated quarter labels and a partial-year report. The gallery screenshot uses fixture data, not this component's rows.
Tags: bar, grouped.