Docs Charts Core charts

HorizontalBarChart

React example follows below.
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>
);
}
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>
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;
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} />
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
data
ChartCategoricalDatum[]
required
max
number | undefined
optional
color
string | undefined
optional
valueSuffix
string | undefined
optional
legend
boolean | LegendConfig | undefined
optional
tooltip
boolean | TooltipBehaviorConfig | undefined
optional
interactive
boolean | undefined
optional
speed
number | undefined
optional
Playback-speed multiplier for entrance/ambient motion.
morphDurationMs
number | undefined
optional
How long a dataset change tweens, in ms.
replayToken
string | number | undefined
optional
Changing this value replays the entrance animation.
renderer
import("@grassroot/core").ChartRenderer | undefined
optional
className
string | undefined
optional
theme
import("@grassroot/theme").PartialChartTheme | undefined
optional
animation
import("@grassroot/theme").ChartAnimationInput | undefined
optional
Prop
data
Type
ChartCategoricalDatum[]
Default
Requirement
required
Description
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

  • children
  • dataSummary

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
data
readonly BarDatum[]
required
max
number | undefined
optional
color
string | undefined
optional
valueSuffix
string | undefined
optional
renderer
ChartRenderer | undefined
optional
ariaLabel
string | undefined
optional
className
string | undefined
optional
title
string | undefined
optional
description
string | undefined
optional
theme
PartialChartTheme | undefined
optional
animation
ChartAnimationInput | undefined
optional
interactive
boolean | undefined
true
optional
keyboardNavigation
boolean | undefined
true
optional
tooltip
boolean | TooltipBehaviorConfig | undefined
true
optional
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

  • dataSummary
  • default

Import

import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootHorizontalBarChart } from "@grassroot/charts-angular";

Props

Prop
Type
Default
Requirement
data
readonly BarDatum[]
required
max
number
optional
color
string
optional
valueSuffix
string
optional
renderer
ChartRenderer
optional
speed
number
optional
morphDurationMs
number
optional
replayToken
string | number
optional
ariaLabel
string
optional
className
string
optional
title
string
optional
description
string
optional
theme
PartialChartTheme
optional
animation
ChartAnimationInput
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

  • children
  • dataSummary

Import

import { HorizontalBarChart } from "@grassroot/charts-svelte";

Props

Prop
Type
Default
Requirement
data
readonly BarDatum[]
required
max
number
optional
color
string
optional
valueSuffix
string
optional
renderer
ChartRenderer
optional
ariaLabel
string
optional
title
string
optional
description
string
optional
keyboardNavigation
boolean
optional
interactive
boolean
true
optional
tooltip
boolean | TooltipBehaviorConfig
true
optional
legend
boolean | LegendConfig
false
optional
theme
PartialChartTheme
optional
animation
ChartAnimationInput
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

  • children
  • dataSummary

Import

import { HorizontalBarChart } from "@grassroot/charts-solid";

Props

Prop
Type
Default
Requirement
data
readonly BarDatum[]
required
max
number
optional
color
string
optional
valueSuffix
string
optional
renderer
ChartRenderer
"auto"
optional
ariaLabel
string
optional
interactive
boolean
true
optional
tooltip
boolean | TooltipBehaviorConfig
optional
legend
boolean | LegendConfig
optional
title
string
optional
description
string
optional
keyboardNavigation
boolean
optional
theme
PartialChartTheme
optional
animation
ChartAnimationInput
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

  • children
  • dataSummary