-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
It could be useful to provide a native statistics view across several trackers and the whole vault . This feature is aimed at users who want to visualise their tracked time without needing to configure a custom view using the API.
A first draft of a working implementation (see src and the demo in test-vault in my fork at https://github.com/the-quotient/ObsidianSimpleTimeTracker/tree/feature/statistics) introduces two new code blocks and corresponding commands:
Daily Statistics View
- Code Block: simple-time-tracker-statistics-day
- Command: Insert Time Tracker Statistics Day
- This view renders a summary of all time tracked for a specific day, determined by the file name (e.g., 2025-09-21.md). It includes total durations broken down by custom categories and a detailed list of all tracker entries for that day.
- It is possible to add a target working time via the settings
Monthly Statistics View
- Code Block: simple-time-tracker-statistics-month
- Command: Insert Time Tracker Statistics Month
- This view provides a comprehensive monthly report, also based on the file name (e.g., 2025-09.md). It groups entries by week and calculates the deviation from a target time. The block is pre-filled with configurable parameters, including deviation (to carry over time from a previous month), vacationDays, sickDays, and daysOff.
A potential improvement for the future would be to automate the process of carrying over the deviation value from one month to the next. This would eliminate the need for users to manually transfer the final accumulated deviation.
If you are interested in adding this feature, I would be happy to open a pull request and am open to making any changes.