A pie describes how a known total is divided. For a support team, new tickets can be partitioned by one primary category so that the whole remains the actual number of tickets received. The screenshot is from Fission's chart gallery.
What the chart is for
Use it for a small number of mutually exclusive categories. Multi-tag ticket counts do not form a pie total because one ticket can appear in several tags. A bar chart is better when precise ranking matters more than composition.
Data model
PieSeries takes label/value pairs and derives each angle from its share of the summed values. Prepare non-negative finite category counts and retain an explicit unknown category. No positive total should produce an empty state, not an invented complete circle.
Authoring from a Fission component
The parent classifies and counts tickets before rendering. Localized category names and display labels are supplied as props.
use fission::prelude::*;
use fission::charts::{Chart, PieSeries};
// The parent resolves display labels from its translation bundles.
fission_component! {
pub SupportTicketCategoryShare<()> {
props {
chart_title: String,
series_label: String,
tickets_by_primary_category: Vec<(String, f32)>,
}
}
view(report, _state, _cx) {
let values = report.tickets_by_primary_category.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)
.into()],
)
}
Testing and accessibility
Test an uncategorised ticket, a single category and similar counts. Ensure every source ticket contributes exactly once. Provide exact totals and percentages alongside the chart so the shape is not the only explanation.