Trend Analyzer
Track a metric over time, filtered by date range.
Demonstration using a representative 30-day sample dataset.
What is happening?
The trend line is a linear regression of the metric against the day index within your selected date range: a positive slope means the metric is generally climbing over that window, even with day-to-day noise. Narrowing the range can flip the trend direction; that's expected, and part of why the range matters as much as the metric.
Under the Hood
Date-range selection↓Rows filtered to the range↓Linear regression of metric vs. day index
Inputs
- 30 daily rows: orders, average order value
Processing
- Date filtering
- Least-squares trend line
Output
- Line chart with trend overlay
- Trend direction + summary stats
Technology
- Vanilla JavaScript
- Hand-built inline SVG chart
Explore another experiment
More Playground experiments are on the way.