sheengemologic ui
All components

BarChart

Renders bounded grouped or stacked categorical bars in vertical or horizontal responsive SVG layouts.@gemologic/sheen-charts · data

Playground

Regional revenueWest leads; South lacks a prior-period value.
North, Current: 42North, Previous: 38South, Current: 36West, Current: 51West, Previous: 46
Use Left and Right Arrow, Home, and End to inspect samples. Press Escape to clear the inspection.
View as table

West leads; South lacks a prior-period value.

Regional revenue
RegionCurrentPrevious
North4238
South36Missing value
West5146
<BarChart label="Regional revenue" summary="West leads; South lacks a prior-period value." categoryLabel="Region" valueLabel="Revenue" series={revenueSeries} data={revenueData} y={{ format: "number" }} height={260} arrangement="grouped"  arrangement="grouped" layout="vertical"/>

Variant matrix

Revenue by region
Regional revenueWest leads; South lacks a prior-period value.
North, Current: 42North, Previous: 38South, Current: 36West, Current: 51West, Previous: 46
Use Left and Right Arrow, Home, and End to inspect samples. Press Escape to clear the inspection.
View as table

West leads; South lacks a prior-period value.

Regional revenue
RegionCurrentPrevious
North4238
South36Missing value
West5146
layout: vertical
Regional revenueWest leads; South lacks a prior-period value.
North, Current: 42North, Previous: 38South, Current: 36West, Current: 51West, Previous: 46
Use Left and Right Arrow, Home, and End to inspect samples. Press Escape to clear the inspection.
View as table

West leads; South lacks a prior-period value.

Regional revenue
RegionCurrentPrevious
North4238
South36Missing value
West5146
layout: horizontal
Regional revenueWest leads; South lacks a prior-period value.
North, Current: 42North, Previous: 38South, Current: 36West, Current: 51West, Previous: 46
Use Left and Right Arrow, Home, and End to inspect samples. Press Escape to clear the inspection.
View as table

West leads; South lacks a prior-period value.

Regional revenue
RegionCurrentPrevious
North4238
South36Missing value
West5146
arrangement: grouped
Regional revenueWest leads; South lacks a prior-period value.
North, Current: 42North, Previous: 38South, Current: 36West, Current: 51West, Previous: 46
Use Left and Right Arrow, Home, and End to inspect samples. Press Escape to clear the inspection.
View as table

West leads; South lacks a prior-period value.

Regional revenue
RegionCurrentPrevious
North4238
South36Missing value
West5146
arrangement: stacked
Regional revenueWest leads; South lacks a prior-period value.
North, Current: 42North, Previous: 38South, Current: 36West, Current: 51West, Previous: 46
Use Left and Right Arrow, Home, and End to inspect samples. Press Escape to clear the inspection.
View as table

West leads; South lacks a prior-period value.

Regional revenue
RegionCurrentPrevious
North4238
South36Missing value
West5146

Anatomy

Package
@gemologic/sheen-charts
Source
packages/charts/src/BarChart.tsx
Tokens
  • --sheen-chart-1
  • --sheen-chart-2
  • --sheen-chart-grid
  • --sheen-chart-axis
  • --sheen-color-fg
  • --sheen-color-fg-muted

Accessibility

Role: labeled SVG image with visible narrative and native categorical table disclosureKeyboard: Focus the plot and use Left/Right, Home/End, and Escape to inspect categories., Use the native view-as-table disclosure for every exact category and value.

Do

  • Use unique explicit category labels and preserve missing bars as NaN.

Do not

  • Do not truncate the quantitative axis away from zero or exceed 2,000 SVG marks.

Generated props

NameTypeDefaultDescription
label *stringRequired visible and accessible chart name.
summary *stringRequired narrative interpretation.
categoryLabel *stringRequired label for the categorical axis and table column.
valueLabel *stringRequired label for the quantitative axis.
series *readonly ChartSeries[]Validated series definitions and semantic colors.
data *ChartCategoricalDataUnique category labels plus equal-length Float64 value columns.
yChartValueAxisValue formatting; bars always retain an honest zero baseline.
height *numberReserved SVG height, at least 160 CSS pixels.
legendimport("./chart-types.ts").ChartLegendinlineInline, stacked, or hidden series key.
tooltipbooleantrueWhether single-tab-stop pointer and keyboard category inspection is enabled.
emptyJSX.ElementOptional empty-state content.
loadingbooleanfalseMarks retained accepted content busy.
tableimport("./chart-types.ts").ChartTableOptionsNative-table disclosure label and bounded page size.
classstringOptional class appended to the figure.
layout"vertical" | "horizontal"verticalVertical columns or horizontal bars.
arrangement"stacked" | "grouped"groupedBars grouped beside each other or stacked by sign.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.