Sparkline

Un graphique en ligne, aire, barres ou chaleur de la taille d’un mot, sans axes, dans un seul SVG étiré ; décoratif par défaut ou image avec un résumé vocalisé.

Disponible pour
  • Angular: disponible
  • Vue: disponible
  • React: disponible
  • React Native: disponible

Utilisation

Meetings
Talk time
Focus
Streak

Importation

ts
import {
  SoneSparklineComponent,
} from "@surface-one/angular/sparkline";

Référence de l’API

SoneSparklineComponentComposant

`<sone-sparkline>` — a word-sized chart with no axes: a line, an area, bars or a heat strip in one stretched `<svg>`. Decorative by default (next to a number that already says it); pass `[decorative]="false"` to make it an image with a spoken summary.

Sélecteur
sone-sparkline
Inputs
NomType Par défaut
values

The series, oldest first.

readonly number[][]
type

`line` | `area` | `bar` | `heat` (cells on the sequential ramp).

SoneSparklineType"line"
min

The bottom of the scale.

number0
max

The top of the scale; defaults to `niceCeiling(values, 4)`.

number | null | undefinedundefined
tone

The colour (`heat` uses the sequential ramp instead).

SoneChartTone"accent"
decorative

Hidden from assistive technology (default); `false` makes it `role="img"`.

booleantrue
summary

The spoken text when not decorative; defaults to “n values, peak x, total y”.

string | nullnull