Data display / Statistics

Data display

Statistics

The figures a dashboard leads with: an eyebrow, a value with its delta, a segmented bar and its legend — and KPI tiles.

import { EcoStat, EcoKpi, EcoValueChange } from "vue-ecosphere"

Stat

Lead with the number, not a chart. Step through the periods: the delta follows the direction.

Requests closed

18Up 32%
This week

Segbar and legend

The parts of one figure, coloured by the magnitude ramp.

Responded45%
Awaiting review31%
No response24%

KPI grid

Icon, value, toned delta, helper. Returns going down is good: the tone follows the judgement.

Revenue in May

$4.82M

Up 6.1%vs April

All product lines, before tax

Average order value

$86.40

Down 4.5%vs April

Across 55,790 orders · online and in store

Returns, last 12 months

$1.21M

Down 8.2%vs the prior 12 months

Refunds and exchanges

Units in stock

18,420

Up 2.0%vs April

Six warehouses

KPI states

Loading, unchanged, and nothing to compare — never “0%” for a comparison that does not exist.

Revenue in June

Loading

Active stores

42

Unchangedvs April

Open at least one day in May

Revenue, last 12 months

$52.6M

No earlier 12 months stored to compare with

Value change

Old value struck through, the new one, a signed badge; a screen reader hears one sentence.

  • Standard unit price

    From 12.40 to 13.10, up 5.6%

    Per unit · effective 1 Jan 2027

  • Bulk unit price, 100 units or more

    From 9.80 to 9.49, down 3.2%

    Per unit · effective 1 Jan 2027

  • Delivery charge

    4.50, unchanged

    Per order · no new rate

Average delivery time from 3.4 to 2.9 days, down 14.7%, an improvement

Stat API

NameTypeDefaultDescription
labelstring—Eyebrow over the figure.
valuestring | number—The figure, in --font-num with tabular digits.
delta / trendstring / "up" | "down"— / "up"Delta with an arrow; down takes stat__delta--down. Say what it is measured against, or leave it off.
segmentsEcoStatSegment[]—{ label, value, color?, display? }: the segbar and its legend. Colours default to the --p5, --p2, --p0 ramp.
#actions——The period control beside the figure (wknav).

Kpi and ValueChange API

NameTypeDefaultDescription
label / iconstring—Tile name and its decorative RemixIcon.
valuestring | number—Formatted before it reaches the tile; it does not abbreviate.
delta / trend / vsstring / "up" | "down" | "flat" / string—Arrow and words (“Up 6.1%”) and what it is measured against.
judgement"good" | "bad"—Tone only where direction is a judgement; it follows the judgement, not the arrow.
hintstring—Helper at the foot of the tile; aligns across a kpis row.
loadingbooleanfalseSkeletons with aria-busy; label and icon stay.
level2 | 3 | 4—Make the label a heading.
EcoValueChangecomponent—from, to, change, tone (default neutral), label (the sr sentence).