Skip to content
caliper ui pro docs

Diverging bar chart

Agree–disagree answers centred on neutral, so questions compare by sentiment. Segments grow outward from the centre line.

Pro
How much do you agree?
  • The app is fast
  • Pricing is fair
  • Docs answer my questions
  • Support is helpful
How much do you agree?
QuestionStrongly disagreeDisagreeNeutralAgreeStrongly agree
The app is fast814229670
Pricing is fair2648615223
Docs answer my questions1230448836
Support is helpful49258191

When to use

  • Survey and NPS-style questions on a five or seven step scale.
  • Comparing many questions on the same scale.

When not to use

  • Scales without a neutral middle point that means something.
  • A single question; a sentence with the percentages is clearer.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/diverging-bar-chart

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

divergingShares

0 props

No props of its own; it accepts the native props of its root element.

DivergingBarChart

6 props
PropTypeDefaultDescription
label *string—
scale *readonly string[]—Answer labels from most negative to most positive, e.g. five Likert steps.
rows *readonly DivergingRow[]—
loadingboolean—
errorstring—
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It is built on native elements and keeps aria-label, aria-busy and aria-hidden in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/diverging-bar-chart.md

The index of every part is at /llms.txt.

More in Category charts