View Activity Type Breakdown Chart
A donut or bar chart should visualize the distribution of activity types the peer mentor has logged within the selected time window. Each activity type should be color-coded and labeled, with the actual count and percentage visible on tap or via legend. The chart must use the fl_chart Flutter package for rendering and must meet WCAG 2.2 AA contrast requirements. Activity type labels should respect the organization's custom terminology via the org labels system.
User Story
Acceptance Criteria
- Given I have logged activities of multiple types, When I view the statistics dashboard, Then I see a chart displaying each activity type as a distinct segment with a label and count
- Given the chart is rendered, When I tap on a segment, Then I see the activity type name (using org-specific terminology), total count, and percentage of all activities
- Given the organization uses custom labels for activity types, When I view chart labels, Then they reflect the org-specific terminology rather than generic default labels
- Given the chart is displayed, When I use a screen reader, Then each segment is accessible with a descriptive content description announcing type name, count, and percentage
- Given I have only one type of activity logged, When the chart renders, Then it shows a single full segment with the appropriate label rather than an empty or broken chart
Business Value
Understanding the distribution of activity types helps peer mentors reflect on their practice and can surface coaching opportunities for coordinators. Organizations can use aggregate type data to ensure their peer mentors are delivering the right mix of support, which is especially important for Bufdir reporting alignment where activity categories must map to specific reporting fields.
Components
- Activity Chart Widget ui
- Activity Type Donut Chart ui
- fl_chart Adapter infrastructure
- Stats Repository data
- Stats Data Models data
- Coordinator Statistics BLoC infrastructure
- Organization Labels Provider infrastructure
- Organization Labels Provider infrastructure