Activity Type Breakdown Widget
Component Detail
Description
Visualises the distribution of a peer mentor's activities by type (e.g., home visits, phone calls, group sessions) using animated bar or pie segments with colour-coded design tokens. Each segment includes an accessible label combining the activity type name and its percentage share.
activity-type-breakdown-widget
Summaries
The Activity Type Breakdown Widget gives peer mentors an immediate, intuitive picture of how they are spending their volunteering time — whether through home visits, phone calls, or group sessions. By visualising this distribution clearly and accessibly, the organisation empowers mentors to reflect on their impact patterns and programme managers to identify where capacity is concentrated or lacking. This supports more informed strategic decisions about training and resource allocation, ultimately improving programme effectiveness and demonstrating measurable outcomes to funders and stakeholders.
Medium complexity due to the animated chart rendering and the requirement to support both bar and pie segment visual modes with design token colours. The primary dependency is wrapped-animation-controller. Testing must cover animation correctness, colour token application per activity type, tap interaction callbacks, and accessibility label accuracy across varying data distributions including edge cases with zero-value segments. Design token alignment with the broader design system must be confirmed early to avoid visual inconsistency.
Plan for device testing on multiple screen sizes given the proportional nature of chart segments.
ActivityTypeBreakdownWidget takes a typed List
Segment colours must be sourced strictly from design tokens rather than hardcoded values to maintain theme consistency. Handle empty or single-segment data sets explicitly.
Responsibilities
- Render animated chart of activity type distribution
- Apply design token colours for each activity type category
- Generate per-segment accessibility descriptions
- Support tap interaction to expand detail per activity type
Interfaces
ActivityTypeBreakdownWidget({required List<ActivityTypeStat> stats})
animateIn(): void
onSegmentTapped(callback: Function(ActivityTypeStat)): void
getAccessibilitySummary(): String
Relationships
Related Data Entities (1)
Data entities managed by this component
Used Integrations (1)
External integrations and APIs this component relies on