View Activity Trends Chart
The Activity Chart Widget is embedded on the Statistics Dashboard Screen and renders a dynamic chart of the peer mentor's activity volume over time. The chart supports both bar chart (for comparing discrete periods) and line chart (for showing continuous trends) modes. The x-axis represents time intervals appropriate to the selected date range filter — days for the week view, weeks for the month view, months for the year view. The y-axis represents the number of activities or hours. The chart meets WCAG 2.2 AA colour contrast requirements so it is accessible to users with visual impairments. The peer mentor can switch between chart types with a single tap.
User Story
Acceptance Criteria
- Given I am on the Statistics Dashboard Screen, when the chart loads, then I see an Activity Chart Widget displaying my activity volume plotted over time for the selected period
- Given the chart is displaying in bar mode, when I tap the chart type toggle, then the chart switches to line mode and vice versa
- Given I have selected the 'week' date range, when the chart renders, then the x-axis shows individual days of the current week
- Given I have selected the 'year' date range, when the chart renders, then the x-axis shows months of the current year
- Given I am a user with a visual impairment, when I view the chart, then all colours used meet WCAG 2.2 AA contrast ratio requirements
- Given my selected period has no activity data, when the chart loads, then I see a friendly empty state message rather than a broken or blank chart
Business Value
Visual trend charts make abstract numbers meaningful by showing momentum and patterns. Seeing an upward trend or a consistent streak is a powerful motivator for volunteers. This visual representation is a core component of the Spotify Wrapped-style engagement that NHF and HLF explicitly requested, and it supports the broader gamification roadmap.