Skip to content
Components / Metrics

Series chart

A bar or line chart for one shared series contract.

@fabrials/ui
Loading state
Synthetic requests and cost by month
LabelRequestsCost
Jun42018
Jul61024
Aug54021

Installation

  1. Import the control from @fabrials/ui, after setting the app up.

    TypeScript
    import { SeriesChart } from "@fabrials/ui";

API reference

Prop / exportTypeDescription
datarecord[]Rows of values.
xKeystringCategory field.
series{ key, label }[]The measures to draw.
kindbar | lineBar for a mix, line for a value over time.
captionstringNames the chart for the accessible table.

Behavior

The legend can hide a series or show only one. An accessible table repeats the values. Decorative sparklines are not this chart.

Accessibility

Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.