Add Core Web Vitals distribution histogram to tech report#1241
Open
alonkochba wants to merge 3 commits intoHTTPArchive:mainfrom
Open
Add Core Web Vitals distribution histogram to tech report#1241alonkochba wants to merge 3 commits intoHTTPArchive:mainfrom
alonkochba wants to merge 3 commits intoHTTPArchive:mainfrom
Conversation
8d85b23 to
9d68f1b
Compare
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
9d68f1b to
d6cdb0b
Compare
tunetheweb
requested changes
Apr 16, 2026
- Rename title/description per suggestion ("Core Web Vitals histograms")
- Restructure button bar so all 3 buttons appear first in DOM order,
followed by content wrappers (fixes tab order)
- Remove per-component metric selectors; the pass-rate timeseries
selector now drives the geo breakdown and histogram via a shared
cwv-metric-change event
- Deep-linking works via ?good-cwv-over-time=CLS
- Histogram resolves "overall" to LCP (has no combined view)
- Titles update dynamically ("LCP histogram", "INP geographic breakdown")
- Rename "Show distribution" button to "Show histogram"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two collapsible panels below the Core Web Vitals timeseries chart:
Both panels share a single button bar (alongside
Show table) with mutual exclusion — opening one closes the other. Content is lazy-loaded on first open.The metric selector from the pass-rate timeseries now drives all three components (timeseries, geo breakdown, histogram) via a shared
cwv-metric-changeevent and thegood-cwv-over-timeURL param. Deep-linking with?good-cwv-over-time=CLSapplies to all three. Titles update dynamically (LCP histogram,INP geographic breakdown, etc.). The histogram resolvesoveralltoLCPsince it shows one metric at a time.Also scopes the global
.highcharts-pointCSS rule to line/spline series only, so column chart bar colors render correctly.Depends on
/v1/cwv-distributionBigQuery endpointCloses #1147