Periods and smoothing
A named period, or an explicit pair of dates. Long periods bucket into whole weeks or months, measured back from the latest day.
974.4M downloads · +1.5% · 2026-09-28 to 2026-10-27 · 7 days repaired
The code for what is on screen
import { between } from "package-trends";
<PackageTrend package="react" period="last-month" />
<PackageTrend package="react" period={between("2026-06-01", "2026-08-31")} />Smoothing never touches the numbers
Daily counts swing threefold across the week, so the drawn line is a 7-day mean by default. Every
figure beside it — total, average, peak, change — comes from the raw series, so a smoothed chart
cannot quietly restate the total. Never sum trend.values: it is the drawing, not the
data.
Questions
Can I sum trend.values to get the total?
No. values is the smoothed series that gets drawn. Every figure — total, mean, peak, change — comes from the raw points, and trend.total is the one to use.