> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Task Analytics

> View task metrics including open count, overdue count, 30-day completions, priority breakdown, and a 7-day completion trend chart.

The Task Analytics page presents visual and numeric metrics for tasks in your organization, including open/overdue counts, priority distribution, and a 7-day trend chart. It is reached at `/tasks/analytics`.

## Overview

The page is wrapped in a `PermissionGate` for `pf.task_analytics.view`. When data is available, it renders:

* **Three stat cards**: Open Tasks, Overdue, Completed (30d).
* **Open Tasks by Priority** — a bar chart broken down by priority level.
* **7-Day Trend** — a line chart showing created vs. completed tasks over the past 7 days.

Data is fetched via `useTaskAnalytics` scoped to the current organization.

## Who it's for

Requires `pf.task_analytics.view` (component-level `PermissionGate`). No explicit route-level permission guard — the route itself at `/tasks/analytics` is open to authenticated users.

## Before you start

* Tasks must exist in the system for meaningful data to appear.
* Your account must have `pf.task_analytics.view`.

## Steps

1. Navigate to **Tasks → Analytics** (`/tasks/analytics`).
2. Review the summary stat cards for open, overdue, and recently completed task counts.
3. Check the **Open Tasks by Priority** bar chart for workload distribution.
4. Review the **7-Day Trend** line chart to see creation and completion velocity.

## Key concepts

**Priority breakdown** — tasks grouped by priority label (e.g., low, medium, high, urgent).

**7-Day Trend** — shows `created` and `completed` counts per day over the most recent 7 days.

## Related

<Columns cols={2}>
  <Card title="Platform Foundation" icon="layer-group" href="/pf/overview">
    Platform Foundation overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index" />
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/platform.tsx
  * src/platform/tasks/pages/TaskAnalyticsPage.tsx
  * src/platform/tasks/hooks/useTaskAnalytics.ts
</Accordion>
