feat(stats): add stats fragment with charts for timer data#48
Merged
Conversation
Owner
ardevd
commented
Mar 30, 2026
- Add vico views dependency for charts
- Create SimplePieChartView for tag breakdown
- Add StatsFragment with tag pie chart and duration column chart
- Add stats menu item to RecordsListFragment
- Include logic to handle empty states and format axes appropriately
- Add vico views dependency for charts - Create SimplePieChartView for tag breakdown - Add StatsFragment with tag pie chart and duration column chart - Add stats menu item to RecordsListFragment - Include logic to handle empty states and format axes appropriately
There was a problem hiding this comment.
Pull request overview
Adds a new “Stats” screen to visualize timer/record data with a tag breakdown pie chart and a per-day duration column chart, and wires navigation to it from the records list.
Changes:
- Add the Vico Views chart dependency and a basic chart style.
- Introduce
StatsFragment+fragment_stats.xmlto render charts with time-range chips. - Add a “Stats” action to the records list menu (including icon + strings).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| gradle/libs.versions.toml | Adds Vico version + vico-views library alias. |
| app/build.gradle.kts | Includes Vico Views dependency for chart rendering. |
| app/src/main/res/values/themes.xml | Adds a chart style resource used by the Vico chart view. |
| app/src/main/res/values/strings.xml | Adds strings for the new “Stats” menu item. |
| app/src/main/res/menu/menu_records_list.xml | Adds the “Stats” toolbar/menu action. |
| app/src/main/res/layout/fragment_stats.xml | New UI layout for stats (chips, charts, loading/error views). |
| app/src/main/res/drawable/ic_charts.xml | New chart icon used by the menu item. |
| app/src/main/java/net/ardevd/tagius/features/stats/ui/StatsFragment.kt | Implements stats UI logic: range chips, record aggregation, feeding chart models. |
| app/src/main/java/net/ardevd/tagius/features/stats/ui/SimplePieChartView.kt | Adds a custom pie chart view for tag breakdown. |
| app/src/main/java/net/ardevd/tagius/features/records/ui/list/RecordsListFragment.kt | Navigates to StatsFragment when the “Stats” action is selected. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
app/src/main/java/net/ardevd/tagius/features/stats/ui/SimplePieChartView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/net/ardevd/tagius/features/stats/ui/SimplePieChartView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/net/ardevd/tagius/features/stats/ui/SimplePieChartView.kt
Show resolved
Hide resolved
app/src/main/java/net/ardevd/tagius/features/stats/ui/SimplePieChartView.kt
Show resolved
Hide resolved
app/src/main/java/net/ardevd/tagius/features/stats/ui/SimplePieChartView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/net/ardevd/tagius/features/stats/ui/SimplePieChartView.kt
Outdated
Show resolved
Hide resolved
…eChartView.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…eChartView.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.