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

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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
requis
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

Emplacements de contenu exposés par ce composant.

#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

Événements émis par ce composant.

@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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic gauge

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.