Klar

Charts / React basic charts / Progress

Linear meter

Progress to a goal on a scaled track with threshold zones, a target pin and last period’s ring, compact enough to stack a whole scorecard.

React component LinearMeter, data through props. Distance to a target, a budget or a deadline. Tags: progress bar, meter, goal, target, threshold, quota, gauge, okr.

Install

npm i klar-charts

import 'klar-charts/styles.css'
import { ThemeScope, LinearMeter } from 'klar-charts'

# or copy the source:
npx shadcn@latest add https://klar.run/r/basic-linear-meter.json

Usage

<LinearMeter label="Win rate" sublabel="Closed-won ÷ closed" value={27} target={30} previous={24} max={40} zones={[{ to: 20, label: 'Well under target' }, { to: 28, label: 'Close to target' }, { to: 40, label: 'At or above target' }]} segments={seg} format={pct} showScale />

Related linear meter charts