Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Gauge - Single-Value Arc Indicator

Signature

sp.gauge(title, *, value, min_val=0.0, max_val=100.0, label="", variant="basic", comparison=0.0, **kwargs) -> Chart

Description

sp.gauge() is the unified entry point for the gauge family. A gauge maps a single scalar to a colored arc with optional thresholds - perfect for status / health / utilization KPIs. The variant keyword switches the geometry (half, three-quarter, full ring), the embellishments (needle, ticks, glow) and the layering (single arc vs. concentric arcs for value-vs-target).

Parameters

ParameterUsed by variants
comparisonconcentric
max_valarc270, concentric, tick
min_valarc270, tick
valueconcentric, sleek

Returns

Chart - object with .html property and .show() method.


Signature

sp.gauge(title, *, value, min_val=0.0, max_val=100.0, label="", variant="basic", comparison=0.0, **kwargs) -> Chart

Description

sp.gauge() est le point d entree unique pour la famille jauge. Une jauge associe un scalaire unique a un arc colore avec des seuils optionnels - parfait pour des KPIs de statut / sante / utilisation. Le mot-cle variant change la geometrie (demi, trois-quart, anneau complet), les ornements (aiguille, ticks, glow) et la composition (arc simple ou arcs concentriques pour valeur-vs-cible).

Parametres

ParametreTypeDefautDescription
titlestrrequisTitre du graphique
valuefloatrequisValeur courante a afficher
min_valfloat0.0Minimum de l echelle
max_valfloat100.0Maximum de l echelle
variantstr"basic"Style visuel (voir tableau)
labelstr""Sous-libelle sous la valeur
comparisonfloat0.0Valeur de comparaison (pour concentric)
seuilslist[(float,int)]None[(value, color_hex), ...] seuils
widthint400Largeur (px)
heightint300Hauteur (px)

Retour

Chart - objet avec propriete .html et methode .show().