ChartGauge

Data Visualization
stable

Solid gauge (radial progress indicator). A 270-degree track with a filled arc indicating the current value, an optional centre label, and optional min/max endpoint labels. Reads the first datum of the first series.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamChartGaugeSchematic of the gauge chart component with numbered internal parts. 1 Chart title 2 3 4 72% 5 0 100 6
Anatomy of <origam-chart-gauge> — 6 internal parts.
1.origam-chart-gauge__header
Header block. Contains title and subtitle divs.
2.origam-chart-gauge__body
Body container. Wraps the SVG and empty-state overlay.
3.origam-chart__gauge-track
Background arc path — always full 270 degrees.
4.origam-chart__gauge-fill
Foreground arc path — length proportional to value ratio.
5.origam-chart__gauge-value
Centre value label. Hidden when gaugeShowValue=false.
6.origam-chart__gauge-endpoint (min/max)
Min and max labels at arc endpoints. Hidden when gaugeShowEndpoints=false.

API

Props

All props accepted by this component, with their type, default value and description.

gaugeMin
number
0
Lower bound of the gauge range.
gaugeMax
number
100
Upper bound of the gauge range.
gaugeUnit
string
''
Unit appended to the centre label (e.g. "%", " km/h").
gaugeThickness
number
18
Arc thickness in SVG pixels.
gaugeStartAngle
number
-3π/4 (≈ -2.356)
Arc start angle in radians. Default = bottom-left of a 270-degree arc.
gaugeEndAngle
number
3π/4 (≈ 2.356)
Arc end angle in radians. Default = bottom-right of a 270-degree arc.
gaugeShowEndpoints
boolean
true
Render gaugeMin and gaugeMax labels at the arc endpoints.
gaugeShowValue
boolean
true
Render the centre value label.
series
required
Array<IChartSeries>
[]
Data series. Only series[0].data[0] is consumed as the gauge value. Extra series are ignored.
categories
Array<string>
title
string
Optional chart title rendered above the gauge SVG.
subtitle
string
Optional subtitle rendered below the title.
showLegend
boolean
legendPosition
TChartLegendPosition
showTooltip
boolean
animated
boolean
true
Animate the fill arc on first paint and data changes.
animationDuration
number
Palette used when a series does not pin its own color.
aspectRatio
string
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
height
number | string
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
rounded
boolean | number | string | TRounded | null | undefined
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
elevation
TElevation
bgColor
TColor
fontSize
TFontSize
fontWeight
TFontWeight

API

Slots

Content slots exposed by this component.

#gauge-value
Replace the centre value label. Receives raw value, normalised ratio (0..1), formatted string and unit.
#gauge-min
Replace the min label at the start of the arc.
#gauge-max
Replace the max label at the end of the arc.
#title
Replace the title block.
#empty
Rendered when series is empty or has no data.

API

Emits

Events emitted by this component.

@point-click
IChartPoint, MouseEvent | KeyboardEvent
Fired on click on the gauge arc.
@legend-click
IChartSeries, number
Fired when the user clicks a legend entry.
@series-toggle
IChartSeries, boolean
Resulting visibility flip after a legend click.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Chart root background colour.
Inner padding of the chart root.
Duration of the fill arc animation.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

ARIA roles

figure
img

Notes

  • Root element has role="figure" with aria-label set to the title prop or "gauge chart".
  • SVG has role="img" with aria-valuemin, aria-valuemax, aria-valuenow attributes for screen readers.
  • All animations are disabled under prefers-reduced-motion: reduce.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
color
var(--origam-color__surface---default)
Root chart background.
color
var(--origam-color__text---primary)
Title text colour.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic gauge

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.