Sparkline

Un gráfico de línea, área, barras o calor del tamaño de una palabra, sin ejes, en un único SVG estirado; decorativo por defecto o una imagen con un resumen hablado.

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

Uso

Meetings
Talk time
Focus
Streak

Importación

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

Referencia de la API

SoneSparklineComponentComponente

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

Selector
sone-sparkline
Inputs
NombreTipo Predeterminado
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