- Prop
data- Type
ChartCategoricalDatum[]- Default
- —
- Requirement
- required
- Description
- —
HorizontalBarChart
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
- surface
- —
- marks
- —
- size
- —
- value
- —
ts
const horizontalBarChartFixture = { id: "horizontal-bar-chart", data: [ { label: "Returns", value: 27.3 }, { label: "Billing", value: 18.6 }, { label: "Order changes", value: 11.4 }, { label: "Technical support", value: 8.7 }, { label: "Account access", value: 5.2 }, { label: "Shipping delay", value: 4.8 }, { label: "Product defect", value: 4.1 }, { label: "Cancellation", value: 3.6 }, { label: "Warranty", value: 2.9 }, { label: "Gift cards", value: 1.8 }, ], ariaLabel: "Median support ticket resolution time in hours by queue, July 2026", tooltip: true, legend: false,}; import { HorizontalBarChart } from "@grassroot/charts-react"; export default function HorizontalBarChartDemo() { return ( <div> <HorizontalBarChart {...horizontalBarChartFixture} /> </div> );}- surface
- —
- marks
- —
- size
- —
- value
- —
ts
<script setup lang="ts">const horizontalBarChartFixture = { id: "horizontal-bar-chart", data: [ { label: "Returns", value: 27.3 }, { label: "Billing", value: 18.6 }, { label: "Order changes", value: 11.4 }, { label: "Technical support", value: 8.7 }, { label: "Account access", value: 5.2 }, { label: "Shipping delay", value: 4.8 }, { label: "Product defect", value: 4.1 }, { label: "Cancellation", value: 3.6 }, { label: "Warranty", value: 2.9 }, { label: "Gift cards", value: 1.8 }, ], ariaLabel: "Median support ticket resolution time in hours by queue, July 2026", tooltip: true, legend: false,}; import { HorizontalBarChart } from "@grassroot/charts-vue";</script><template><HorizontalBarChart v-bind="horizontalBarChartFixture" /></template>- surface
- —
- marks
- —
- size
- —
- value
- —
ts
import { ChangeDetectionStrategy, Component } from "@angular/core";const horizontalBarChartFixture = { id: "horizontal-bar-chart", data: [ { label: "Returns", value: 27.3 }, { label: "Billing", value: 18.6 }, { label: "Order changes", value: 11.4 }, { label: "Technical support", value: 8.7 }, { label: "Account access", value: 5.2 }, { label: "Shipping delay", value: 4.8 }, { label: "Product defect", value: 4.1 }, { label: "Cancellation", value: 3.6 }, { label: "Warranty", value: 2.9 }, { label: "Gift cards", value: 1.8 }, ], ariaLabel: "Median support ticket resolution time in hours by queue, July 2026", tooltip: true, legend: false,}; import { GrassrootHorizontalBarChart } from "@grassroot/charts-angular";@Component({ selector: "app-horizontal-bar-chart-chart-demo", standalone: true, imports: [GrassrootHorizontalBarChart], changeDetection: ChangeDetectionStrategy.OnPush, template: `<grassroot-horizontal-bar-chart [data]="fixture.data" [ariaLabel]="fixture.ariaLabel" [tooltip]="fixture.tooltip" [legend]="fixture.legend" />`,})export class HorizontalBarChartDemoComponent { readonly fixture = horizontalBarChartFixture;}export default HorizontalBarChartDemoComponent;- surface
- —
- marks
- —
- size
- —
- value
- —
ts
<script lang="ts"> const horizontalBarChartFixture = { id: "horizontal-bar-chart", data: [ { label: "Returns", value: 27.3 }, { label: "Billing", value: 18.6 }, { label: "Order changes", value: 11.4 }, { label: "Technical support", value: 8.7 }, { label: "Account access", value: 5.2 }, { label: "Shipping delay", value: 4.8 }, { label: "Product defect", value: 4.1 }, { label: "Cancellation", value: 3.6 }, { label: "Warranty", value: 2.9 }, { label: "Gift cards", value: 1.8 }, ], ariaLabel: "Median support ticket resolution time in hours by queue, July 2026", tooltip: true, legend: false, }; import { HorizontalBarChart } from "@grassroot/charts-svelte";</script> <HorizontalBarChart {...horizontalBarChartFixture} />- surface
- —
- marks
- —
- size
- —
- value
- —
ts
/** @jsxImportSource solid-js */const horizontalBarChartFixture = { id: "horizontal-bar-chart", data: [ { label: "Returns", value: 27.3 }, { label: "Billing", value: 18.6 }, { label: "Order changes", value: 11.4 }, { label: "Technical support", value: 8.7 }, { label: "Account access", value: 5.2 }, { label: "Shipping delay", value: 4.8 }, { label: "Product defect", value: 4.1 }, { label: "Cancellation", value: 3.6 }, { label: "Warranty", value: 2.9 }, { label: "Gift cards", value: 1.8 }, ], ariaLabel: "Median support ticket resolution time in hours by queue, July 2026", tooltip: true, legend: false,}; import { HorizontalBarChart } from "@grassroot/charts-solid";export default function HorizontalBarChartDemo() { return <HorizontalBarChart {...horizontalBarChartFixture} />;}Installation
API Reference
Import
import { HorizontalBarChart } from "@grassroot/charts-react";
Props
Prop
Type
Default
Requirement
Description
dataChartCategoricalDatum[]—
required
—
maxnumber | undefined—
optional
—
colorstring | undefined—
optional
—
valueSuffixstring | undefined—
optional
—
legendboolean | LegendConfig | undefined—
optional
—
tooltipboolean | TooltipBehaviorConfig | undefined—
optional
—
interactiveboolean | undefined—
optional
—
speednumber | undefined—
optional
Playback-speed multiplier for entrance/ambient motion.
morphDurationMsnumber | undefined—
optional
How long a dataset change tweens, in ms.
replayTokenstring | number | undefined—
optional
Changing this value replays the entrance animation.
rendererimport("@grassroot/core").ChartRenderer | undefined—
optional
—
classNamestring | undefined—
optional
—
themeimport("@grassroot/theme").PartialChartTheme | undefined—
optional
—
animationimport("@grassroot/theme").ChartAnimationInput | undefined—
optional
—
- Prop
max- Type
number | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
color- Type
string | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
valueSuffix- Type
string | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
legend- Type
boolean | LegendConfig | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
tooltip- Type
boolean | TooltipBehaviorConfig | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
interactive- Type
boolean | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
speed- Type
number | undefined- Default
- —
- Requirement
- optional
- Description
- Playback-speed multiplier for entrance/ambient motion.
- Prop
morphDurationMs- Type
number | undefined- Default
- —
- Requirement
- optional
- Description
- How long a dataset change tweens, in ms.
- Prop
replayToken- Type
string | number | undefined- Default
- —
- Requirement
- optional
- Description
- Changing this value replays the entrance animation.
- Prop
renderer- Type
import("@grassroot/core").ChartRenderer | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
className- Type
string | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
theme- Type
import("@grassroot/theme").PartialChartTheme | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
animation- Type
import("@grassroot/theme").ChartAnimationInput | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
title- Type
string | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
description- Type
string | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
ariaLabel- Type
string | undefined- Default
- —
- Requirement
- optional
- Description
- —
- Prop
keyboardNavigation- Type
boolean | undefined- Default
- —
- Requirement
- optional
- Description
- —
Content regions
childrendataSummary
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { HorizontalBarChart } from "@grassroot/charts-vue";
Props
Prop
Type
Default
Requirement
datareadonly BarDatum[]—
required
maxnumber | undefined—
optional
colorstring | undefined—
optional
valueSuffixstring | undefined—
optional
rendererChartRenderer | undefined—
optional
ariaLabelstring | undefined—
optional
classNamestring | undefined—
optional
titlestring | undefined—
optional
descriptionstring | undefined—
optional
themePartialChartTheme | undefined—
optional
animationChartAnimationInput | undefined—
optional
interactiveboolean | undefinedtrueoptional
tooltipboolean | TooltipBehaviorConfig | undefinedtrueoptional
- Prop
data- Type
readonly BarDatum[]- Default
- —
- Requirement
- required
- Prop
max- Type
number | undefined- Default
- —
- Requirement
- optional
- Prop
color- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
valueSuffix- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
renderer- Type
ChartRenderer | undefined- Default
- —
- Requirement
- optional
- Prop
ariaLabel- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
className- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
title- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
description- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
theme- Type
PartialChartTheme | undefined- Default
- —
- Requirement
- optional
- Prop
animation- Type
ChartAnimationInput | undefined- Default
- —
- Requirement
- optional
- Prop
interactive- Type
boolean | undefined- Default
true- Requirement
- optional
- Prop
keyboardNavigation- Type
boolean | undefined- Default
true- Requirement
- optional
- Prop
tooltip- Type
boolean | TooltipBehaviorConfig | undefined- Default
true- Requirement
- optional
- Prop
legend- Type
boolean | LegendConfig | undefined- Default
false- Requirement
- optional
- Prop
speed- Type
number | undefined- Default
- —
- Requirement
- optional
- Prop
morphDurationMs- Type
number | undefined- Default
- —
- Requirement
- optional
- Prop
replayToken- Type
string | number | undefined- Default
- —
- Requirement
- optional
Content regions
dataSummarydefault
Import
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootHorizontalBarChart } from "@grassroot/charts-angular";
Props
Prop
Type
Default
Requirement
datareadonly BarDatum[]—
required
maxnumber—
optional
colorstring—
optional
valueSuffixstring—
optional
rendererChartRenderer—
optional
speednumber—
optional
morphDurationMsnumber—
optional
replayTokenstring | number—
optional
ariaLabelstring—
optional
classNamestring—
optional
titlestring—
optional
descriptionstring—
optional
themePartialChartTheme—
optional
animationChartAnimationInput—
optional
- Prop
data- Type
readonly BarDatum[]- Default
- —
- Requirement
- required
- Prop
max- Type
number- Default
- —
- Requirement
- optional
- Prop
color- Type
string- Default
- —
- Requirement
- optional
- Prop
valueSuffix- Type
string- Default
- —
- Requirement
- optional
- Prop
renderer- Type
ChartRenderer- Default
- —
- Requirement
- optional
- Prop
speed- Type
number- Default
- —
- Requirement
- optional
- Prop
morphDurationMs- Type
number- Default
- —
- Requirement
- optional
- Prop
replayToken- Type
string | number- Default
- —
- Requirement
- optional
- Prop
ariaLabel- Type
string- Default
- —
- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
- Prop
title- Type
string- Default
- —
- Requirement
- optional
- Prop
description- Type
string- Default
- —
- Requirement
- optional
- Prop
theme- Type
PartialChartTheme- Default
- —
- Requirement
- optional
- Prop
animation- Type
ChartAnimationInput- Default
- —
- Requirement
- optional
- Prop
keyboardNavigation- Type
boolean- Default
- —
- Requirement
- optional
- Prop
interactive- Type
boolean- Default
true- Requirement
- optional
- Prop
tooltip- Type
boolean | TooltipBehaviorConfig- Default
true- Requirement
- optional
- Prop
legend- Type
boolean | LegendConfig- Default
false- Requirement
- optional
Content regions
childrendataSummary
Import
import { HorizontalBarChart } from "@grassroot/charts-svelte";
Props
Prop
Type
Default
Requirement
datareadonly BarDatum[]—
required
maxnumber—
optional
colorstring—
optional
valueSuffixstring—
optional
rendererChartRenderer—
optional
ariaLabelstring—
optional
titlestring—
optional
descriptionstring—
optional
interactivebooleantrueoptional
tooltipboolean | TooltipBehaviorConfigtrueoptional
legendboolean | LegendConfigfalseoptional
themePartialChartTheme—
optional
animationChartAnimationInput—
optional
- Prop
data- Type
readonly BarDatum[]- Default
- —
- Requirement
- required
- Prop
max- Type
number- Default
- —
- Requirement
- optional
- Prop
color- Type
string- Default
- —
- Requirement
- optional
- Prop
valueSuffix- Type
string- Default
- —
- Requirement
- optional
- Prop
renderer- Type
ChartRenderer- Default
- —
- Requirement
- optional
- Prop
ariaLabel- Type
string- Default
- —
- Requirement
- optional
- Prop
title- Type
string- Default
- —
- Requirement
- optional
- Prop
description- Type
string- Default
- —
- Requirement
- optional
- Prop
keyboardNavigation- Type
boolean- Default
- —
- Requirement
- optional
- Prop
interactive- Type
boolean- Default
true- Requirement
- optional
- Prop
tooltip- Type
boolean | TooltipBehaviorConfig- Default
true- Requirement
- optional
- Prop
legend- Type
boolean | LegendConfig- Default
false- Requirement
- optional
- Prop
theme- Type
PartialChartTheme- Default
- —
- Requirement
- optional
- Prop
animation- Type
ChartAnimationInput- Default
- —
- Requirement
- optional
- Prop
speed- Type
number- Default
- —
- Requirement
- optional
- Prop
morphDurationMs- Type
number- Default
- —
- Requirement
- optional
- Prop
replayToken- Type
string | number- Default
- —
- Requirement
- optional
- Prop
class- Type
string- Default
- —
- Requirement
- optional
- Prop
style- Type
string- Default
- —
- Requirement
- optional
Content regions
childrendataSummary
Import
import { HorizontalBarChart } from "@grassroot/charts-solid";
Props
Prop
Type
Default
Requirement
datareadonly BarDatum[]—
required
maxnumber—
optional
colorstring—
optional
valueSuffixstring—
optional
rendererChartRenderer"auto"optional
ariaLabelstring—
optional
interactivebooleantrueoptional
tooltipboolean | TooltipBehaviorConfig—
optional
legendboolean | LegendConfig—
optional
titlestring—
optional
descriptionstring—
optional
themePartialChartTheme—
optional
animationChartAnimationInput—
optional
- Prop
data- Type
readonly BarDatum[]- Default
- —
- Requirement
- required
- Prop
max- Type
number- Default
- —
- Requirement
- optional
- Prop
color- Type
string- Default
- —
- Requirement
- optional
- Prop
valueSuffix- Type
string- Default
- —
- Requirement
- optional
- Prop
renderer- Type
ChartRenderer- Default
"auto"- Requirement
- optional
- Prop
ariaLabel- Type
string- Default
- —
- Requirement
- optional
- Prop
interactive- Type
boolean- Default
true- Requirement
- optional
- Prop
tooltip- Type
boolean | TooltipBehaviorConfig- Default
- —
- Requirement
- optional
- Prop
legend- Type
boolean | LegendConfig- Default
- —
- Requirement
- optional
- Prop
title- Type
string- Default
- —
- Requirement
- optional
- Prop
description- Type
string- Default
- —
- Requirement
- optional
- Prop
keyboardNavigation- Type
boolean- Default
- —
- Requirement
- optional
- Prop
theme- Type
PartialChartTheme- Default
- —
- Requirement
- optional
- Prop
animation- Type
ChartAnimationInput- Default
- —
- Requirement
- optional
- Prop
speed- Type
number- Default
- —
- Requirement
- optional
- Prop
morphDurationMs- Type
number- Default
- —
- Requirement
- optional
- Prop
replayToken- Type
string | number- Default
- —
- Requirement
- optional
- Prop
class- Type
string- Default
- —
- Requirement
- optional
- Prop
style- Type
JSX.CSSProperties- Default
- —
- Requirement
- optional
Content regions
childrendataSummary