27 lines
883 B
Markdown
27 lines
883 B
Markdown
# Statistics
|
|
|
|
## Overview
|
|
|
|
Dashboard charts powered by [[Backend]] statistics endpoints and the library store.
|
|
|
|
## Charts
|
|
|
|
### CouchDayChart
|
|
- Shows watch distribution by day of week (bar chart)
|
|
- Endpoint: `GET /statistics/watch-weekday`
|
|
- **Only counts records with `accuracy = 'EXACT'`** (Milestone 001)
|
|
- Queries both `EpisodeSeen` and `EntrySeen` tables
|
|
|
|
### LibraryGrowthChart
|
|
- Shows cumulative library growth over time (area chart)
|
|
- Data source: Library store entries (client-side computation)
|
|
- Uses `createdAt` field as the entry date (Milestone 001)
|
|
- Includes all entries (library + watchlist)
|
|
- Supports year filter with "All" option
|
|
|
|
## Important Files
|
|
|
|
- `react_frontend/src/components/dashboard/CouchDayChart.tsx`
|
|
- `react_frontend/src/components/dashboard/LibraryGrowthChart.tsx`
|
|
- `backend/controllers/statisticsController.js` — `getWatchdayDistribution` method
|