EEnterUI
DocsComponentsThemesDonation
Get Started
      • LineChart
      • AreaChart
      • StackedBarChart
      • Heatmap
EnterUIDocsData AnalyticsMetrics and ChartsChartsStackedBarChart
Data AnalyticsUpdated 6 May 2026

StackedBarChart

Responsive SVG stacked bars for compact breakdowns.

StackedBarChart compares category contribution across periods without adding a charting dependency.

#Default usage

Usage breakdown

Stack two to five series for usage, billing, or release status splits.

Usage by channelJan Web: 18Jan API: 8Jan Jobs: 4Feb Web: 22Feb API: 12Feb Jobs: 7Mar Web: 16Mar API: 10Mar Jobs: 9WebAPIJobs
Code
<StackedBarChart
  ariaLabel="Usage by channel"
  data={[
    { month: "Jan", web: 18, api: 8, jobs: 4 },
    { month: "Feb", web: 22, api: 12, jobs: 7 },
    { month: "Mar", web: 16, api: 10, jobs: 9 },
  ]}
  series={[
    { key: "web", label: "Web", tone: "default" },
    { key: "api", label: "API", tone: "info" },
    { key: "jobs", label: "Jobs", tone: "success" },
  ]}
  showLegend
  xKey="month"
/>

#Import

Code
import { StackedBarChart } from "@froggdesign/enter-ui-react";

#Patterns

Release status

Use semantic tones only when the series itself is semantic.

Release status by weekW1 Shipped: 12W1 Review: 5W1 Failed: 1W2 Shipped: 16W2 Review: 4W2 Failed: 2W3 Shipped: 14W3 Review: 6W3 Failed: 1

#Accessibility

Pass ariaLabel or aria-label. Each segment includes a text summary through SVG titles, but exact values should also appear in nearby table or metric copy when precision matters.

#API

  • data: records for each bar.
  • xKey: period or category field.
  • series: { key, label, tone?, color? }[].
  • height: SVG height.
  • ariaLabel: accessible chart label.
  • showLegend: renders a compact in-SVG legend marker row.
  • className: style hook for layout.
  • Legacy labelKey remains supported.

#Styling

StackedBarChart uses .eui-stacked-bar-chart, .eui-stacked-bar-chart__segment, .eui-stacked-bar-chart__legend, and .eui-stacked-bar-chart__legend-item. Prefer series tone or token-derived color values instead of decorative custom palettes.

PreviousAreaChart
NextHeatmap

On this page

  1. Default usage
  2. Import
  3. Patterns
  4. Accessibility
  5. API
  6. Styling