Skip to content

Add Core Web Vitals distribution histogram to tech report#1241

Draft
alonkochba wants to merge 1 commit intoHTTPArchive:mainfrom
alonkochba:feat/dev3-cwv-distribution-histogram
Draft

Add Core Web Vitals distribution histogram to tech report#1241
alonkochba wants to merge 1 commit intoHTTPArchive:mainfrom
alonkochba:feat/dev3-cwv-distribution-histogram

Conversation

@alonkochba
Copy link
Copy Markdown
Member

@alonkochba alonkochba commented Apr 7, 2026

Summary

Adds a collapsible histogram chart to the CWV section of the tech report drilldown page, showing how origins are distributed across performance buckets.

  • Supports LCP, CLS, INP, FCP, and TTFB metrics via a dropdown selector
  • Bars color-coded green/orange/red by good/needs-improvement/poor thresholds
  • Dashed plotlines mark threshold boundaries
  • Tail buckets aggregated into an overflow "X+" bar so all origins are visualized
  • Loading spinner while the API call is in progress, error message on failure
  • Supports light and dark mode
  • Collapsed by default; anchor link (#section-cwv_distribution) with auto-expand
  • Fetches data from /v1/cwv-distribution with technology, date, rank, and geo params

Also scopes the global .highcharts-point CSS rule to line/spline series only, so column chart bar colors render correctly.

Depends on

Closes #1147

Adds a collapsible histogram chart to the CWV section showing how origins
are distributed across performance buckets for LCP, CLS, INP, FCP, and TTFB.

Features:
- Column chart with bars color-coded green/orange/red by CWV thresholds
- Dashed plotlines marking good/needs-improvement boundaries
- Tail buckets aggregated into an overflow "X+" bar so all origins are shown
- Metric selector in the collapsed summary bar for quick switching
- Loading spinner while the API call is in progress
- Error message when data is unavailable
- Light and dark mode support with theme-aware colors
- Anchor link (#section-cwv_distribution) with auto-expand on direct navigation
- URL hash updates when the section is expanded

Fetches data from /v1/cwv-distribution (HTTPArchive/tech-report-apis#105)
with technology, date, rank, and geo parameters.

Also scopes the global .highcharts-point CSS rule to line/spline series only,
so column chart bar colors are not overridden.

Closes HTTPArchive#1147
@alonkochba alonkochba force-pushed the feat/dev3-cwv-distribution-histogram branch from f2eec8d to 0ab9b9a Compare April 11, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tech Report: Histograms per KPI

1 participant