Data display / Meter

Data display

Meter

One proportion, in the two shapes a dashboard needs: a 6px bar and a 92px ring.

import { EcoMeter } from "vue-ecosphere"

Bar — in a row, beside its figure

Attendance at 61% is a warning; 61% of the syllabus covered in October is not. Use state only where it means something.

82%94%61%28%

Ring — leading a card

The ring is self-labelling: the figure sits in the middle.

91%

Attendance

96%

Fees cleared

64%

Papers set

31%

Rooms mapped

Bar inside a list row

Down a list, the bar keeps a fixed share of the row so every bar lines up.

Grade 9 · section D38 of 42 seats90%
Grade 10 · section A41 of 44 seats93%

API

NameTypeDefaultDescription
valuenumber—Required. The proportion, 0–100 (clamped).
form"bar" | "ring""bar"Bar for one column of many; ring for a single figure leading a card.
state"ok" | "warn" | "bad"—Colours the fill by state. Only where high and low genuinely mean good and bad.
labelstring—Ring caption (eyebrow) below the figure.
showValuebooleantrueThe figure beside a bar. A bar alone shows the shape of a number nobody can read.
aria-label / aria-labelledbystring—Names the meter (role="meter", 0–100) for assistive tech. A ring is named by its label; give every bar one, or point it at the row's name.