# Duration Chart

The duration chart is a bar chart on the Dashboard that shows how tracked time is spread across the filtered date range. Each bar represents a time period — a day, a week, or a month — and its height reflects the total time logged during that period.

---

## What Each Bar Represents

Each bar shows the total duration of all time entries that fall within that period. The taller the bar, the more time was tracked.

- The **x-axis** shows period labels (dates, date ranges, or month names depending on the granularity).
- The **y-axis** shows hours.
- A **duration label** appears above each bar showing the exact time in Xh Ym format (e.g., "8h 30m").
- **Hovering** over a bar displays a tooltip with the period label and exact duration.

Periods where no time was logged appear as empty gaps in the chart, making it easy to spot days or weeks with missing entries.

---

## Automatic Granularity

The chart automatically selects the grouping level based on the span of your date filter. You don't need to choose this — it adjusts itself to show a useful number of bars for the date range you're viewing.

| Date Range Span | Grouping | Bar Labels | Example |
| ---------------- | -------- | ---------- | ------- |
| **7 days or fewer** | Daily | Individual dates | Mar 24, Mar 25, Mar 26 |
| **8 to 90 days** | Weekly | Date ranges | Mar 24 – Mar 30, Mar 31 – Apr 6 |
| **More than 90 days** | Monthly | Month names | March 2026, April 2026 |

The chart title updates to match the granularity: **"Duration by day"**, **"Duration by week"**, or **"Duration by month"**.

### How Granularity Affects What You See

- **Daily view** (7 days or fewer): Useful for reviewing a single week. Each bar is one calendar day, so you can see exactly which days had the most activity.
- **Weekly view** (8–90 days): The default for a typical month. Each bar covers a Monday-through-Sunday week, labeled with the date range (e.g., "Mar 24 – Mar 30").
- **Monthly view** (more than 90 days): Useful for quarterly or yearly views. Each bar is one calendar month.

To change the granularity, adjust the date range in the filter bar. For example, narrowing from a full month to a single week switches the chart from weekly to daily bars. See [Filtering Reports](https://docs.invup.me/books/reports/page/filtering-reports) for details on changing the date range.

---

## Empty Periods

If a period has no time entries, its bar doesn't appear — leaving a visible gap in the chart. This makes it easy to identify:

- Days where no one logged time
- Weeks with unusually low activity
- Gaps in coverage that might indicate missing entries

---

## Empty State

If no time entries match the current filters at all, the chart displays "No data for the selected period" instead of an empty chart. This typically happens when the date range has no entries or when filters are too narrow.