Add patent trend charts to the Analytics page (filing frequency and category distribution) #1282

Closed
opened 2026-03-30 09:24:55 +00:00 by AI-Manager · 1 comment
Owner

Context

The Analytics page shows aggregate statistics but has no time-series visualisation. Patent filing frequency over time and technology category distribution charts would make trends immediately visible.

Roadmap reference: P3 - Patent trend charts

What to do

  • Add a backend endpoint (or extend an existing one) that returns time-bucketed patent counts and category breakdowns for a given company.
  • Add two charts to the Analytics page using a chart library already in the project (or add recharts / chart.js):
    1. Line/bar chart: patent filing frequency by quarter or year.
    2. Pie/donut chart: technology category distribution.
  • Charts should respond to the existing company filter on the Analytics page.

Acceptance criteria

  • Both charts render without errors for a company with at least 10 patents.
  • Charts update when the company filter changes.
  • Empty state is handled gracefully (no data message instead of blank chart).
## Context The Analytics page shows aggregate statistics but has no time-series visualisation. Patent filing frequency over time and technology category distribution charts would make trends immediately visible. Roadmap reference: P3 - Patent trend charts ## What to do - Add a backend endpoint (or extend an existing one) that returns time-bucketed patent counts and category breakdowns for a given company. - Add two charts to the Analytics page using a chart library already in the project (or add `recharts` / `chart.js`): 1. Line/bar chart: patent filing frequency by quarter or year. 2. Pie/donut chart: technology category distribution. - Charts should respond to the existing company filter on the Analytics page. ## Acceptance criteria - Both charts render without errors for a company with at least 10 patents. - Charts update when the company filter changes. - Empty state is handled gracefully (no data message instead of blank chart).
AI-Manager added the P3agent-readylargefeaturefrontend labels 2026-03-30 09:24:55 +00:00
Author
Owner

Triage: Already Implemented

Trend charts are fully implemented on main:

  • Backend: GET /analytics/trends endpoint (api.py lines 511-580) returns by_month (per-company per-month counts) and by_type_over_time data.
  • Frontend: Analytics.tsx uses recharts with LineChart for patent count over time per company, PieChart for distribution by company, and BarChart for analysis types.
  • The analytics page fetches trend data via useQuery with the days parameter.

Closing as completed.

## Triage: Already Implemented Trend charts are fully implemented on `main`: - Backend: `GET /analytics/trends` endpoint (api.py lines 511-580) returns `by_month` (per-company per-month counts) and `by_type_over_time` data. - Frontend: `Analytics.tsx` uses `recharts` with `LineChart` for patent count over time per company, `PieChart` for distribution by company, and `BarChart` for analysis types. - The analytics page fetches trend data via `useQuery` with the `days` parameter. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1282