sheengemologic ui
All components

ChartDataTable

Provides a bounded, localized native-table alternative and narrative summary for a chart.@gemologic/sheen-charts · data

Playground

This example has no scalar controls. Its validated source remains interactive below.
View as table

Latency generally declined; one sample is missing.

API latency
Timep99 latency
Jan 1, 2024, 12:00:00 AM42 ms
Jan 1, 2024, 12:01:00 AMMissing value
<ChartDataTable label="API latency" summary="Latency generally declined; one sample is missing." xLabel="Time" series={latencySeries} data={latencyData} x={{ type: "time", tz: "UTC" }} y={{ format: "duration" }} />

Variant matrix

Latency data alternative
View as table

Latency generally declined; one sample is missing.

API latency
Timep99 latency
Jan 1, 2024, 12:00:00 AM42 ms
Jan 1, 2024, 12:01:00 AMMissing value

Anatomy

Package
@gemologic/sheen-charts
Source
packages/charts/src/ChartDataTable.tsx
Tokens
  • --sheen-color-fg
  • --sheen-color-fg-muted
  • --sheen-color-border
  • --sheen-color-bg-subtle

Accessibility

Role: native details disclosure containing a captioned tableKeyboard: Enter or Space toggles the native summary., Pagination uses native button order.

Do

  • Give every chart a concise narrative summary and preserve gaps as missing values.
  • Keep page sizes bounded even though chart data is already in memory.

Do not

  • Do not mount an entire high-volume time series as table rows.
  • Do not format dates with the browser's implicit timezone or locale.

Generated props

NameTypeDefaultDescription
label *stringRequired accessible table caption naming the chart data.
summary *stringRequired narrative description shown when the table disclosure opens.
xLabel *stringRequired header for the time or numeric domain column.
series *readonly import("./chart-types.ts").ChartSeries[]Validated series definitions used as column headers.
data *import("./chart-types.ts").ChartDataValidated equal-length Float64 columns; NaN cells remain explicit gaps.
x *import("./chart-types.ts").ChartTimeAxis | import("./chart-types.ts").ChartNumberAxisTime or numeric domain formatting; omitted timezones deterministically use UTC.
yimport("./chart-types.ts").ChartValueAxisShared value formatting for every series column.
pageSizenumber50Rows mounted per table page, from 1 through 200.
viewLabelstringOptional localized disclosure label; context messages supply the default.
loadingbooleanfalseMarks the retained accepted table busy without replacing its rows.
classstringOptional class appended to the disclosure root.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.