Revenue mix donut

Revenue composition depends on when revenue is recognised and how adjustments are treated. A product-line mix is meaningful only when every category uses the same policy and currency. The screenshot is from Fission's chart gallery.

What the chart is for

Use this donut for a non-negative recognised-revenue breakdown in one reporting period. Where refunds leave a category negative, use a signed comparison rather than hiding the adjustment in a pie.

Data model

Aggregate in exact money types, retaining tax, currency and recognition policy in the domain model. Convert the final non-negative values to the chart's f32 display representation. The inner radius creates whitespace, not an automatic centre total.

Authoring from a Fission component

The parent supplies the prepared product-line report and localized labels.
use fission::prelude::*;
use fission::charts::{Chart, PieSeries};

// The parent resolves display labels from its translation bundles.
fission_component! {
    pub RecognisedRevenueMix<()> {
        props {
            chart_title: String,
            series_label: String,
            revenue_gbp_by_product: Vec<(String, f32)>,
        }
    }
    view(report, _state, _cx) {
        let values = report.revenue_gbp_by_product.iter()
            .map(|(label, value)| (label.as_str(), *value))
            .collect();
    } => Chart(
        title: Some(report.chart_title.clone()),
        series: vec![PieSeries::new(&report.series_label)
            .data(values)
            .inner_radius(48.0)
            .into()],
    )
}

Testing and accessibility

Test refunds, currency conversion and recognition-period boundaries. Provide exact amounts and the total outside the plot; revenue contribution is not margin or cash received.
Tags: donut, revenue.