Velocity X Components

Stats & Numbers

Trend Line Chart Card

A headline metric paired with a small multi-point trend line, sized to drop straight into a dashboard grid cell — MRR, active users, response time over time. Carries first/last axis labels and an optional second comparison series (this period vs last), with a legend and hidden data table so the trend is never colour-only.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add trend-line-chart-card

Built for astro.

Full docs for Trend Line Chart Card →

Needs a licence key — subscribe here, then velocityx loginonce.

astro v1.0.1
Trend Line Chart Card
Monthly recurring revenue
$48.2k +12.4% vs last period (increased)
Apr Oct
Monthly recurring revenue — exact values
Period Monthly recurring revenue
Apr 32
May 35
Jun 34
Jul 39
Aug 41
Sep 44
Oct 48

Props

NameTypeRequiredDefaultDescription
titlestringNo'Monthly recurring revenue'
valueTextstringNo'$48.2k'Headline figure shown above the chart.
deltaTextstringNo'+12.4% vs last period'
deltaDirection'up' | 'down' | 'flat'No'up'
pointsnumber[]No[32, 35, 34, 39, 41, 44, 48]Single-series shorthand — ignored if `series` is passed.
xLabelsstring[]No['Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']First/last (or evenly-spaced) x-axis hints, same length as points.
seriesTrendSeries[]NoTwo-series form, for period-over-period comparisons.
classNamestringNo''

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/trend-line-chart-card/TrendLineChartCard.astro

Using the Trend Line Chart Card component

Install it with velocityx add trend-line-chart-card. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from Stats & Numbers.