Sparkline

Um gráfico de linha, área, barras ou calor do tamanho de uma palavra, sem eixos, em um único SVG esticado; decorativo por padrão ou uma imagem com um resumo falado.

Disponível em
  • Angular: disponível
  • Vue: disponível
  • React: disponível
  • React Native: disponível

Uso

Meetings
Talk time
Focus
Streak

Importação

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

Referência da 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.

Seletor
sone-sparkline
Inputs
NomeTipo Padrão
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